JSON

JSON Sort Keys

Mengurutkan kunci objek dalam JSON secara alfabet dan rekursif — urutan elemen array tidak berubah, hanya kunci objek di setiap tingkat nested yang diurutkan.

Pertanyaan yang sering diajukan

Why would I sort JSON keys?

Sorted keys make it easier to diff two versions of a JSON document and make configuration files or API responses more predictable when browsing them.

Does this change the order of array elements?

No. Only object keys are sorted at every nesting level — array element order is left exactly as it was in the input, since arrays are ordered by position, not by keys.

Is the data processed on a server?

No, sorting happens entirely in your browser via JavaScript, with nothing sent anywhere else.