javascript - And Query on Parse Cloud code -
this looks trivial query can't seem make work.. trying instance object has locationname = "nyc" , groupname = "adults". trying query using code found on parse documentation:
var groupquery = new parse.query("mytable"); groupquery.equalto("group", groupname); var locationquery = new parse.query("mytable"); locationquery.equalto("location", locationname); var mainquery = parse.query.or(locationquery, groupquery);
but fail because using parse.query.or instead should have been parse.query.and which, reason doesn't exist... there alternative way it, reason cannot find on documentation.. cheers
parse queries use , default, why there parse.query.or(). want can achieved way :
var mainquery = new parse.query("mytable"); mainquery.equalto("group", groupname); mainquery.equalto("location", locationname);
Comments
Post a Comment