I’m trying to save some specific JSon data and store them in a simple NSArray.
This is the JSon I have:
products = {
72 = {
value_a = "something1";
value_b = "something2";
value_c = "something3";
};
73 = {
value_a = "something1";
value_b = "something2";
value_c = "something3";
};
74 = {
value_a = "something1";
value_b = "something2";
value_c = "something3";
};
[etc]
}
This is how I assign the JSon data in a NSMutableArray.
NSMutableArray *array = [json objectForKey:@"products"];
What I need is to store, let’s say, just value_b of each child in an array. Any suggestion?
What you have here is a dictionary containing key/values, where values are also dictionaries. If you need to have an array containing, say value_b, of each of these dictionaries you can have it like this: