Search...
length
Returns the number of values in the aggregate results.
Type:
numberRead Only
Was this helpful?
Get the number of values in the aggregate results
Copy Code
1let length = results.length; // 4
Run an aggregation and get the number of values in the aggregate results
Copy Code
1import wixData from 'wix-data';23wixData.aggregate("PopulationData")4 .group("state")5 .max("population")6 .run()7 .then((results) => {8 let length = results.length; // 39 });