Quantcast
Channel: Appcelerator Developer Center Q&A Unanswered Questions 20
Viewing all articles
Browse latest Browse all 8068

ACS query object that "contains", instead of "starts by"

$
0
0

Hi.

I know we can query objects in ACS with a regex expresion to search for a value that starts with some value, like this:

Cloud.Objects.query({
  classname: 'Topics',
  where: {name: {'$regex': '^' + stringToSearch}}
}...
But, can we search for values in the middle of the string? For example, if my objects are:
apple
appleseed
seed
I can search for app and regex will retrieve the first 2 elements. It is possible to do a search for see to retrieve the last 2 elements?

Viewing all articles
Browse latest Browse all 8068

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>