I'm parsing a piece of JSON into a NSDictionary, but I'm having some trouble sequencing this into an array of data which I can push into a UITableView
After parsing the JSON data I have this in a NSDictionary (this is the result from NSLog on the NSdictionary):
Code:
1 = {
artist = "Bruno Mars";
"artist_url" = "http://url.here/bruno-mars.htm";
attributes = {
youtube = "http://www.youtube.com/v/7pNDpxkf3hk";
};
"lyric_url" = "http://url.here/just-the-way-you-are.htm";
title = "Just the way you are";
};
2 = {
artist = "Duck sauce";
"artist_url" = "http://url.here/duck-sauce.htm";
attributes = {
youtube = "http://www.youtube.com/v/wWhtcU4-xAM";
};
"lyric_url" = "http://url.here/barbra-streisand.htm";
title = "Barbra Streisand";
};
etc.. until I have 40 results..
Basically what I want to do, is:
- Grab the results from 1 and stuff the variables into an array
- Parse the array (no issue here, once I have it actually IN there I can work with it no problem)
- Stick the results from 1 into the first indexPath.row entry of the UITableView (that'd be index 0)
- recycle the array, rince and repeat for entry 2 to 40
I could use some pointers for especially the first problem, specifically I need to grab JUST 1 entry from the NSDictionary and stuff it into an array..