This guide will provide an overview and examples of working with sorting data in Molten UIs.
Overview
To sort data received from the leverege api, when requesting a list of devices, we provide an Imagine Sort to the api. The sort informs the api the properties to sort the data on, in addition to the order that they should appear in. Leverege’s sort is backed by elasticsearch and supports relevant query operations.
The Imagine Sort is a plain JSON object that encodes the query structure. The following sort will sort the devices based off of the field specified, in the order specified.
[
{
field : 'data.company.name',
order : 'asc'
}
]
Sorts can be performed along an interface path to sort the response data based off of the information included in the sort.
AttributeSortModel