M&M
Posts: 0
Joined: Tue Nov 11, 2014 6:59 am

Query Service with multiple "Where" parameters

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

Rui Song Chong
Posts: 0
Joined: Sat Jan 17, 2015 10:51 am

Query Service with multiple "Where" parameters

Hi, this is what I want, thank you so much!

Return to “Issues”