I have a SwiftyJSON object.
How to search by key (name) from an array of SwiftyJSON object .
Example:
let arrCountry = [JSON]()
Now one array of countries contains
{
countryid : "1"
name : "New York"
},
{
countryid : "2"
name : "Sydeny"
}
How to search by predicate or something else?
If I look for "y" from an array, then it should return both objects (because both contain "y") in another JSON array. And if I type "Sid", then it should return only one object in the JSON array. Like a LIKE query in SQL. And how do we do with predicates ...
source
share