sortNumber
sortNumber
Sorts a DataSet list field numerically.
Parameters
dmName(String): The DataSet name (DM name)responseKey(String): The field path within the list to sort by (e.g."list.price")asc(String): The sort direction"ascending"— ascending order"descending"— descending order"origin"— restore the original order
attrPath(Stringornull): An alternate attribute path to sort by instead of the field value. Passnullif not needed
Returns: None (void)
Description
Sorts the DataSet's list using numeric comparison. Sorting a string field with this method parses the values as numbers before comparing them — use sortString for string fields.
Example
$vm.sortNumber("stock", "list.price", "descending", null);
Related
$vm.sortString(dmName, responseKey, asc)— sort as strings$vm.sortBy(dmName, jsonData)— sort by multiple conditions