Search...
length
Returns the number of items in the current results page.
Description
Type:
numberRead Only
Was this helpful?
Get the
length
of a query resultCopy Code
1let resultLength = results.length; // 20
Perform a query and get the
length
of the resultCopy Code
1import { Permissions, webMethod } from 'wix-web-module';2import { contacts } from 'wix-crm-backend';34export const getPageLength = webMethod(Permissions.Anyone, async () => {5 try {6 const results = await contacts.queryContacts().find();7 return results.length; // 208 } catch (error) {9 console.error(error);10 }11});