I am trying to store data fetched API which is in form of array of dictionaries. I want to store these values in my database. API response stores in an object.
[
{
"sort_priority": 1,
"desc": "",
"img_url": "",
"id": 3,
"name": "First Run"
},
{
"sort_priority": 2,
"desc": "",
"img_url": "",
"id": 4,
"name": "Shorts"
},
{
"sort_priority": 3,
"desc": "",
"img_url": "",
"id": 1,
"name": "Animation"
},
{
"sort_priority": 4,
"desc": "",
"img_url": "",
"id": 2,
"name": "Documentary"
}
]
I just want to store name and id from this list.
[Categories MR_importFromObject:responseObject];
Categories
is an Entity and responseObject
is an object returned from API