sort JSON object keys by name


I have a JSON object after serializing it in "JSONSerialize" action , is there a way to create a string from this object with the keys in the object being sorted in alphabetic way ? also i need to create this string without separators and concatenated, for example my JSON object:


my desired output i'm looking to create is:




If you want to convert your json object to string you can achieve this by JavaScript

check this if it helps

1) Store your string into local variable 

2) Add a button that will call Js and pass your string into your JS and take a output at the end

code snippet - 

const txt = '{"name":"John", "age":30, "city":"New York"}'

const obj = JSON.parse(txt);

var parseString = + obj.age;

And check this 

var myObj = {"signature":"dsf54sd5f4ds56f4","shipping_charges":"1.000","account_id":"123456","customer_shipping_state":"","reference_id":"5t097doz7dkDU_20_0"} ,

  keys = Object.keys(myObj),

  i, len = keys.length;


for (i = 0; i < len; i++) {

  k = keys[i];

  console.log(k + myObj[k]);


Also you can checkout to this Forge hope it works -

I hope this helps


Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.