I have a JMESP query which returns me IP Addresses:
--query "[].{Zone: '$($zone.Name)', IPv4: aRecords[0].ipv4Address, Name: name}
From here
Now I want to sort the result based on the IP Address like this post
I tried this code:
[].{Zone: '$($zone.Name)', IPv4: aRecords[0].ipv4Address, Name: name} | sort_by(.IPv4 | split(".")[] | tonumber)
But it get the following error message:
az : ERROR: argument --query: expected one argument
So do you have any idea how can I do that?