Sorting a list of Things according to a JSON response?

Anyone know how to do this? I’m currently creating the list with:

set list:Search for Thing

and the constraint is:

Name is in JSON array

This lets me have a typed list of Things but returns it in a random order. I don’t want to use a recursive workflow since that would be slow and cost WU.

@randomanon what do u want to sort by?

Is it a field on the original type or a list of names in alpha order?

Have you tried in dynamic expression for set list, after search to use sorted by operator? Is the sort field not on the thing but the JSON?

The specific order that’s returned by the API. It’s not a field on the Thing.

Yup, exactly.

Put the JSON into a datasource and sort it by the key value then used the value in your search expression

I ended up writing a plugin serverside action to handle this.