Test script to check the json data displayed alphabetically

Hello,
How to write a test script to validate the JSON data members are listed alphabetically. Would like to make this as a generic script so that this can be used with any JSON data result.

Example:
{
“name”: “Jane”,
“age”: 29,
“hobbies”: [
“skating”,
“painting”
],
“email”: null
}
The above result will fail since name, age, hobbies and email are not listed alphabetically.
TY

@descent-module-cand6 Welcome to the community :partying_face:

I doubt this can be done directly. May be you can sort the keys and store in a variable and try to validate it against the original response.

Found a similar thread here. please check if that helps :blush: