I'm trying to teach myself, but struggling with how to store something like NSArray inside an NSDictionary.
Suppose you had an NSDictionary for recipes:
Let's say in NSDictionary there were such keys as:
Spaghetti, Fettusin Alfredo, Grilled Chicken Salad
And in NSDictionary was NSArray, which was just a list of ingredients.
I assume that the equivalent PHP code would be something like this:
$['Spaghetti'] = array('Spaghetti Pasta', 'Spaghetti Sauce', 'Meatballs');
$['Fettucine Alfredo'] = array('Fettucine Pasta', 'Alfredo Sauce');
$['Grilled Chicken Salad'] = array('Lettuce', 'Grilled Chicken', 'Croutons');
I am struggling with how to add NSArray to NSDictionary. Then what if I wanted to delete an element or add an element to an array? How is it extracted and removed or added?
source
share