I would like to sort alphabetically according to a key.
A JSON object can be sorted with Workato using 2 types of actions
After obtaining the JSON object, use the Ruby action and sort the unsorted object by entering the following code:
unsorted.sort_by { |hash| hash['key_to_order_by'] }
unsorted.sort_by { |hash| hash['key_to_order_by'] }.reverse
An example recipe can be found HERE.
2. Collections [Business Plus & Above]
After obtaining the JSON object, use the Collections by Workato action to
Send us a ticket, we will try our best to assist you with your problem
Saul Macht
How do I sort a JSON object according to a specific key?
I would like to sort alphabetically according to a key.
A JSON object can be sorted with Workato using 2 types of actions
After obtaining the JSON object, use the Ruby action and sort the unsorted object by entering the following code:
An example recipe can be found HERE.
2. Collections [Business Plus & Above]
After obtaining the JSON object, use the Collections by Workato action to
An example recipe can be found HERE.
Brandon Chew from Chew
A JSON object can be sorted with Workato using 2 types of actions
After obtaining the JSON object, use the Ruby action and sort the unsorted object by entering the following code:
An example recipe can be found HERE.
2. Collections [Business Plus & Above]
After obtaining the JSON object, use the Collections by Workato action to
An example recipe can be found HERE.