Sorting Array Aggregator Output by 'alt' – Need Help

Hello everyone,

I’d like to ask for your help. I’m having trouble solving the following task:

I need to sort an output array (from an Array Aggregator) by its 'alt' property. This comes after a “Share for Files/Folders” step, where I get a list of photos numbered from 1 to 9. Then, the Array Aggregator generates this list in a random order.

After that, I use a Set Variable module to try to sort the array by the 'alt' property from the previous step, but I haven’t been able to make it work.

Below, I’m sharing the three steps along with the details of the queries:

The output from the Array Aggregator:

{
“array”: [
{
“alt”: “4.png - Camiseta AC Milan Futbol 2003:2005”,
“originalSource”: “…”,
“mediaContentType”: “IMAGE”
},
{
“alt”: “6.png - Camiseta AC Milan Futbol 2003:2005”,
“originalSource”: “…”,
“mediaContentType”: “IMAGE”
},

Now, the output of the Set Variable module (where I’m trying to sort the previous array):

[
{
“sort_images”: “sort({"alt":"4.png - Camiseta AC Milan Futbol 2003:2005","originalSource":"…”:"IMAGE"}, {"alt":"6.png - Camiseta AC Milan Futbol 2003:2005","originalSource":"…","mediaContentType":"IMAGE"}, … etc:

Thank you in advance,