Page 1 of 1

Multiple items in where clause for query

Posted: Mon Jul 21, 2014 8:52 pm
by Chris6995508

Had a quick question on how to go about adding multiple where clauses to a query. I am getting an error. The code is below. Is there a better way to do this? And also how would I go about sorting? Thanks

var isbn;
var school;
var where;

isbn = localStorage.getItem('findISBN');
school = localStorage.getItem('currentSchool');

where = '{"$and": [{"ISBN": isbn},{"School": school}]}';

return where;