Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trial
Gregg Mojica
11,506 PointsLoop Through array and delete non matching pairs
Hey Guys, So I have a JSON array being downloaded from the internet. It's setup in a UITableView so that a particular key is set to the cell's textLabel property.
What I need to do is determine if the cell's textLabel equals a string, let's say @"X" and if it does, only show results that correspond with that cell. So I would need to delete or hide all other cells that don't match. I don't, however, want to use a search bar for this as I will only be doing one match and I need it to happen when the cells load.
And ideas how to do this? I've tried looping using a for in loop. Thanks in advance.