Skip to content

Instantly share code, notes, and snippets.

@hweller1
Last active December 4, 2023 16:49
Show Gist options
  • Save hweller1/1b0fd31a4d90f0b2dbef50757a908eb0 to your computer and use it in GitHub Desktop.
Save hweller1/1b0fd31a4d90f0b2dbef50757a908eb0 to your computer and use it in GitHub Desktop.
searchQ.filter = filter;
}
else if(beds || rooms) {
let filter = { "$and" : []}
if (beds) {
filter.$and.push({"beds" : {"$gte" : parseInt(beds) }})
}
if (rooms)
{
filter.$and.push({"bedrooms" : {"$gte" : parseInt(rooms) }})
}
searchQ.filter = filter;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment