> Portal Navigation: > > - Append `.md` to any URL under `https://dev.wix.com/docs/` to get its markdown version. > - Pages are either content pages (article or reference text) or menu pages (a list of links to child pages). > - To get a menu page, truncate any URL to a parent path and append `.md` (e.g. `https://dev.wix.com/docs/sdk.md`, `https://dev.wix.com/docs/sdk/core-modules.md`). > - Top-level index of all portals: https://dev.wix.com/docs/llms.txt > - Full concatenated docs: https://dev.wix.com/docs/llms-full.txt # Method name: hasNext() # Method package: wixData # Method menu location: wixData --> WixDataAggregateResult --> hasNext # Method Link: https://dev.wix.com/docs/velo/apis/wix-data/wix-data-aggregate-result/has-next.md # Method Description: Indicates if the aggregation has more results. # Method Code Examples: *** Note: do not assume any prop names or enum values other than the ones in the example. ## Get whether the aggregate result object has more results ```javascript let hasNext = results.hasNext(); // true ``` ## Run an aggregation and get whether the aggregate result object has more results ```javascript import wixData from 'wix-data'; wixData.aggregate("PopulationData") .group("state") .max("population") .run() .then((results) => { let hasNext = results.hasNext(); // false }); ``` ## Iterate through all pages of aggregate results ```javascript let results = await wixData.aggregate("Cities") .group("city") .limit(3) .run(); console.log(results.items); while(results.hasNext()) { console.log("---▼ Next Page ▼---"); results = await results.next(); console.log(results.items); } /* Logs: * [{"_id":"San Diego"},{"_id":"Orlando"},{"_id":"San Francisco"}] * ---▼ Next Page ▼--- * [{"_id":"Buffalo"},{"_id":"Miami"},{"_id":"Los Angeles"}] * ---▼ Next Page ▼--- * [{"_id":"Miami"}] */ ``` ---