interface SortNodeParameters {
code?: string;
options?: { disableDotNotation?: boolean };
sortFieldsUi?: {
sortField: {
fieldName: string;
order?: "ascending" | "descending";
}[];
};
type?: "simple"
| "random"
| "code";
}
Javascript code to determine the order of any two items Default: "// The two items to compare are in the variables a and b\n\t// Access the fields in a.json and b.json\n\t// Return -1 if a should go before b\n\t// Return 1 if b should go before a\n\t// Return 0 if there's no difference\n\n\tfieldName = 'myField';\n\n\tif (a.json[fieldName] < b.json[fieldName]) {\n\treturn -1;\n\t}\n\tif (a.json[fieldName] > b.json[fieldName]) {\n\treturn 1;\n\t}\n\treturn 0;" Type options: {"alwaysOpenEditWindow":true,"editor":"jsEditor","rows":10}