Fetching data from a Collection: After you have opened a collection, you can fetch the documents based on given query. For querying JSONStore two classes are provided to work with JSONStoreQuery and JSONStoreQueryPart.
You can use multiple JSONStoreQueryPart objects for same call by passing each JSONStoreQueryPart object in an array.
Multiple JSONStoreQueryPart objects are joined using an OR statement.
Multiple conditions for one JSONStoreQueryPart are joined using an AND statement.

Refer to the following code:

varfavCollection=newJSONStoreCollection('favourites');varqueryPart1=newJSONStoreQueryPart();queryPart1.addBetween("age",21,50);varqueryPart2=newJSONStoreQueryPart();queryPart2.addEqual("gender","female");// Notice how multiple JSONStoreQueryPart objects are passed in an array to build a complex query// The following call will return - all the Documents that has either// "gender" set to "female" OR has "age" between range 21 - 50favCollection.findDocuments([queryPart1,queryPart2]).then(data=>{console.log("Succesfully fetched all documents from collection!"));console.log("Data: "+JSON.stringify(data));.catch(err=>{console.log("Error while fetching data from collection. Reason : "+err);});