I have an array and I want to sort the list in ascending order. How can I do this? I want the field “filename” to be in ascending order. All other fields should follow the order if “filename” is sorted
I’ve attached a working example for your use case, Please give it a try and let me know how it goes!
The key is to split the arrays into individual items so you can use the Sort node. To keep the other fields in sync, concatenate them (link, filename, directory) before splitting; then sort the combined items and finally aggregate them back into the original array structure, now sorted.
I hope the example explains it more clearly:
⚡
If this answers your question, Kindly mark the reply as the solution so others with the same issue can find it easily
@darrell_tw There is a tricky part: syncing the other fields after sorting by filename,
Your solution only sorts filename, without syncing the other fields…