Hi,
-
Assume you have an NSMutableArray of NSMutableDictionary’s
-
I have another dictionary that will be added to the array only if a particular dictionary’s key/value does not match the dictionary to be added.
-
How is this comparison best achieved.
-
Can it be done with NSPredicate or have I got to loop through the array extracting the dictionary for comparison.
I have achieved the comparison with a repeat loop but surely that is inefficient.
I want to check if a particular unique key/value exists in the array of dicts already and if it does then not add to the array.
I have had a look at with no luck:
set tPredicate to NSPredicate's predicateWithFormat_("transID = %@", tTransactionUniqueID)
set tExists to tPredicate's evaluateWithObject_(tRecordData)
Thanks
Terry