Make.com LabIntermediate
Sort an Array with sort() in Make.com
You want to show your top-selling prices first in a daily digest email.
Live Execution Simulator
Idle
π₯
Incoming Data
βοΈ
Make.com Node
π―
Next Step
> Ready. Type your expression below and click "Check Answer" to run the node.
Incoming Payload / Data:
{
"prices": [20, 99, 45]
}
Press Enter or click Check Answer. +20 XP
β Solution & explanation
sort(prices; desc)
Output: [99, 45, 20]
sort(array; order; key) sorts an array. asc is the default; desc reverses it. Use asc ci / desc ci for case-insensitive text sorting.π‘ Pro tip: For an array of collections, add the key: sort(products; desc; price).
Also accepted: sort(prices; "desc")