Reputation: 8807
Given
[3,4]
[5,2]
I'd like to produce:
[5,2]
[3,4]
I tried this but it fails:
echo '[3,4] [5,2]' | jq 'sort_by(.[1])'
jq: error (at <stdin>:1): Cannot index number with number
jq: error (at <stdin>:1): Cannot index number with number
Upvotes: 2
Views: 239