I am using the following query to check if the strings within a NSArray
contain a certain word.
I am struggling to then break it down to display only the string that has the rangeOfString
word.
As you can see it currently displays all the results if the NSArray
contains the word. How would I single it down further to display only the specific string that contains the "BOLDME"
?
// change this line only for the concatenation
NSString * resultConditions = [legislationArray componentsJoinedByString:@"\n"];
NSString *word = @"BOLDME";
//if string contains
if ([resultConditions rangeOfString:word].location != NSNotFound) {
cell.dynamicTextView.text = resultConditions;
}