How do I extract the attributes of a specific type from a JSON API format string? I used NSJSONSerialization
- but that extracts the attributes and puts it under included.attributes
..."included":[{"id":"","type":"name1","attributes":{...}},{"id":"","type":"form-data","attributes":{..}}]}
that serializes into:
included = (
{
attributes = {..};id = "";
type = "name1";
},
{
attributes = {...};
id = "";
type = "name2";
}
);
}
is there a way to extract values of attribute based on value of type?