Search...
sort( )
Creates a sort to be used with the dataset setSort()
function.
Description
This function is not used on its own. It is only used to create a sort
for a dataset using the setSort()
function.
When working with Wix app collections, check which fields can be used in a sort.
Authorization
Request
This endpoint does not take any parameters
Response Object
A sort object.
Returns an empty object.
Status/Error Codes
Was this helpful?
Sort a dataset
Copy Code
1import wixData from 'wix-data';23// ...45$w("#myDataset").setSort( wixData.sort()6 .ascending("lastName")7 .descending("age")8);