So basically I have a huge array of arrays (only a 2-d array)…
My root array lets say has 100 child arrays…
I want to query the root/child arrays and return only the child arrays that have its 2 object equal to hello…
So basically I have a made-up idea below…
updatedArray = [rootArray WHERE childArray objectAtIndex:2 == @"hello"];
Now as you can see I want updated array to contain like 40 or 50 of the child arrays in the rootArray…
See what I mean – its kind of like MySQL only with an array instead of a database?
Try this:
Now
updatedwill contain the arrays inrootArraywhose 3rd object is@"hello".Don’t forget to release it after use (if you don’t use ARC).
You can also use predicates for simple logic; see the NSPredicate class.