Search.../

length

Returns the number of items in the current results page.

Description

The page size is defined by the limit() function, can be retrieved using the pageSize property, and navigating through pages is done with the prev() and next() functions.

Type:

numberRead Only

Was this helpful?

Get the length of a query result

Copy Code
1let resultLength = results.length; // 20
Perform a query and get the length of the result

Copy Code
1import wixData from 'wix-data';
2
3// ...
4
5wixData.query("myCollection")
6 .find()
7 .then((results) => {
8 let resultLength = results.length; // 20
9 }) ;