Skip to content
This repository has been archived by the owner on Oct 6, 2022. It is now read-only.

Latest commit

 

History

History
27 lines (21 loc) · 793 Bytes

record.sort.md

File metadata and controls

27 lines (21 loc) · 793 Bytes

Record.sort

The sort function is established to sort the array.

Sample

	var record = new Record([
		{"data1":"hello world", "data2":123, "data3":new Date("2016/12/13") },
		{"data1":"hello human", "data2":456, "data3":new Date("2016/12/14") }
	]);
	record.sort("data2","asc");

API

CallingReturning
record .sort ( field , action )Record
ParametersTypeDescription
fieldStringThe field name of the array.
actioneq|gt|lt|like|!eq|!gt|!lt|!likeThe comparison action.
valueString|Number|Date|BooleanThe value to compare.