Sorting a JSON array by an arbitrary order using jq
Given this JSON data in the file data.json: [ { "id": 1, "entityType": "cat" }, { "id": 2, "entityType": "dog" }, { "id": 3, "entityType": "bird" }, { "id": 4, "entityType": "cat" } ] How would return an array sorted…