0

I am new in parse. I want to implement a search bar, my problem is that when I pass a string I don't know how to make the query to obtain the information.

    // search is the string I am looking for
    var search= req.body.search;
    alert("search is: "+search);
    var query = new Parse.Query("Place");

    //When I use equalTo the name need to be exactly equal
   //in SQL you can use LIKE or %search%
    query.equalTo("name", search);
  • I don't understand so much your question. See this link: http://stackoverflow.com/questions/4935632/parse-json-in-javascript – saeta Nov 17 '15 at 17:56
  • I want to implement "Select name from Places when name like search" but in parse. I hope that this clarify my question – Ana María González Nov 17 '15 at 18:04

1 Answers1

0

For String values, you can use Regular Expression constraints using matches method on your queries.

Parse.Query matches( key, regex )

You can read about in the documentation here: https://parse.com/docs/js/api/classes/Parse.Query.html#methods_matches

Mo Nazemi
  • 2,618
  • 2
  • 16
  • 23