[android-components](../../index.md) / [mozilla.components.support.ktx.android.org.json](../index.md) / [org.json.JSONObject](index.md) / [sortKeys](./sort-keys.md)

# sortKeys

`fun `[`JSONObject`](https://developer.android.com/reference/org/json/JSONObject.html)`.sortKeys(): `[`JSONObject`](https://developer.android.com/reference/org/json/JSONObject.html) [(source)](https://github.com/mozilla-mobile/android-components/blob/master/components/support/ktx/src/main/java/mozilla/components/support/ktx/android/org/json/JSONObject.kt#L55)

Sorts the keys of a JSONObject (and all of its child JSONObjects) alphabetically

