Search...
query
Returns the query used to get the current results.
Description
Use the query
property to create and run a new query by chaining additional WixDataQueryBuilder functions to it.
Type:
WixDataQueryRead Only
Was this helpful?
Get the query that produced a query result
Copy Code
1let resultQuery = results.query;
Perform a query and get the query that produced the result
Copy Code
1import wixData from 'wix-data';23// ...45wixData.query("myCollection")6 .find()7 .then((results) => {8 let newQuery = results.query;9 newQuery10 .ge("color", "red")11 .find()12 .then((newQueryResults) => {13 let firstItem = newQueryResults.items[0];14 })15 })16 .catch((error) => {17 console.error(error);18 });