Hi I have a json data that comes from $resource request and i need to parse it into array so I could iterate through its properties. any help would be appreciated.
{
"feed": {
"author": {
"name": {
"label": "iTunes Store"
},
"uri": {
"label": "http://www.apple.com/itunes/"
}
},
"entry": [
{
"im:name": {
"label": "Paddington"
},
"im:image": [
{
"label": "url1",
"attributes": {
"height": "60"
}
},
{
"label": "url2",
"attributes": {
"height": "60"
}
},
{
"label": "url3",
"attributes": {
"height": "170"
}
}
]
},
{
"im:name": {
"label": "Interstellar"
},"im:image": [
{
"label": "url4",
"attributes": {
"height": "60"
}
},
{
"label": "url5",
"attributes": {
"height": "60"
}
},
{
"label": "url6",
"attributes": {
"height": "170"
}
}
]
}
],
"updated": {
"label": "2015-04-18T11:29:36-07:00"
},
"rights": {
"label": "Copyright 2008 Apple Inc."
},
"title": {
"label": "iTunes Store: Top Movies"
}
}
}
I need to populate the labels and the Urls
app.factory('movieService',function ($resource) {
return $resource('https://itunes.apple.com/us/rss/topmovies/limit=50/genre=:id/json', {id: '@id'});
});
Thanks
JSON.parse(object)
– Abdul Ahmad 20 hours ago