Sort JSON Object Array

Sort JSON Object Array lets you sort an array of JSON objects by a scalar property using numeric-aware comparison. Enter your own values or load the worked example.

Method and calculation

Sort an array of JSON objects by a scalar property using numeric-aware comparison.

Inputs and settings

Sort JSON Object Array accepts Object array; Sort key.

Worked example

Sort JSON Object Array example — Object array: "[{\"name\":\"Bob\",\"score\":90},{\"name\":\"Alice\",\"score\":80}]"; Sort key: "name". Computed output: [ { "name": "Alice", "score": 80 }, { "name": "Bob", "score": 90 } ]

Output and limitations

Sort JSON Object Array: Input is treated as plain text; it is never executed.

Technical references: RFC 8259 JSON format

Sort JSON Object Array FAQs

Sort JSON Object Array applies the following rule to your input: Sort an array of JSON objects by a scalar property using numeric-aware comparison. The worked example on this page uses the same processor as the result button.
Sort JSON Object Array has these boundaries: Input is treated as plain text; it is never executed. Start by checking the object array field against the units or format shown.
Sort JSON Object Array provides this sample: [ { "name": "Alice", "score": 80 }, { "name": "Bob", "score": 90 } ]. Use the sample button to reproduce it, then replace the inputs with your own values.