I understand. You can easily change those to pick up your values and execute the query. Say for example you are storing the values of Category and Estate when the user clicks on the item to 2 different Local Storage variables. You just need to change the where value to
{"$and": [{"Category": '"' + localStorage.getItem('lsvCat') + '"'}, {"Estate": '"' + localStorage.getItem('lsvEstate') + '"'}]} // Put this in the where value
Alternatively you can read em off using JS and return this value to the where clause
var where = {
"$and": [
{"Category": '"' + Apperyio('compCategory').val() + '"'},
{"Estate": '"' + Apperyio('compEstate').val() + '"'}
]
};
return JSON.stringify(where);
As always there is more than one way of doing things. One of the methods should be of use to you