Server Code Criteria Params not working
I have the following code:
pre
search1Params.criteria = {
"$and" : [{"property_active" : 1},
{"property_type": type},
{"$or" : [{"property_address_city" : {"$regex" : location}},
{"property_address_county" : {"$regex" : location}},
{"property_address_postcode ": {"$regex" : location}}
]
}
]
}
var search1 = Collection.query(dbid, "property", search1Params, sToken);
/pre
I have matched location and type with the correct fields in the database, so it should bring back one record. Instead I get no records and no errors. After searching on here, the Docs and Mongo, I cannot see what I am doing wrong ?