JSON API フォーマット文字列から特定のタイプの属性を抽出するにはどうすればよいですか? 私は使用NSJSONSerialization
しました-しかし、それは属性を抽出し、included.attributesの下に置きます
..."included":[{"id":"","type":"name1","attributes":{...}},{"id":"","type":"form-data","attributes":{..}}]}
次のようにシリアル化されます。
included = (
{
attributes = {..};id = "";
type = "name1";
},
{
attributes = {...};
id = "";
type = "name2";
}
);
}
タイプの値に基づいて属性の値を抽出する方法はありますか?