PFQuery on Array for item starts with String

139 views Asked by At

I have an array of search keywords as a field in a custom object and i wanna make a search when user just enter 2 or 3 characters of any of the array items for example

["cafe" , "food" , "eat"]
["car" , "Gas"]

if user entered caf it should return the object contains this search keyword

[query whereKey:@"keywords" greaterThan:keyword];

returns not relevant data it returns the 2 rows of car and cafe !

I also tried equalTo

[query whereKey:@"keywords" equalTo:keyword];

but to get the row back i should enter the whole word

any ideas what i should query on?

0

There are 0 answers