So, I have the following structure in JSON, which I understand to be an array of key/value pair objects:
{
"notification": [
{
"uid": "20",
"count": "4"
},
{
"uid": "48",
"count": "0"
},
{
"uid": "49",
"count": "0"
},
{
"uid": "53",
"count": "0"
}
]
}
Parsing this with SBJson will result in a collection of dictionaries with one key/value pair each.
I would like to “implode” all of these dictionaries into one dictionary with many key/value pairs. Not worrying about duplicates by the way.
Whats the best way to go about doing this? How can I iterate through a NSDictionary, accessing each item one at a time and pulling out both it’s key and value?
Any ideas on this?
Thanks.
–Conor
Simply iterate through the already existing array of
NSDictionarys. That’s the convenience of JSON, you easily get usable data structures out of your feed string.