Can I use nested keys in Jayson?

I love how you can tap on the key icon to select a meaningful name for array elements in Jayson. However, this seems to be only 1 level deep.

(@simonbs) Is it possible to go multiple levels deep?

For example, when using the https://football-api.org API to get the top scorers of a soccer competition the result is a list of player objects. Choosing player does not help identifying individual elements in the array; being able to use player.name (a string) would.

{
  "count": 2,
  "scorers": [
    {
      "player": {
        "id": 67299,
        "name": "Vangelis Pavlidis",
        "firstName": "Evangelou",
        "lastName": null,
        "dateOfBirth": "1998-11-21",
        "countryOfBirth": "Greece",
        "nationality": "Greece",
        "position": "Midfielder",
        "shirtNumber": 10,
        "lastUpdated": "2019-08-03T05:11:46Z"
      },
      "team": {
        "id": 672,
        "name": "Willem II Tilburg"
      },
      "numberOfGoals": 2
    },
    {
      "player": {
        "id": 7556,
        "name": "Donny van de Beek",
        "firstName": "Donny",
        "lastName": null,
        "dateOfBirth": "1997-04-18",
        "countryOfBirth": "Netherlands",
        "nationality": "Netherlands",
        "position": "Midfielder",
        "shirtNumber": null,
        "lastUpdated": "2019-08-11T05:16:17Z"
      },
      "team": {
        "id": 678,
        "name": "AFC Ajax"
      },
      "numberOfGoals": 2
    }
  ]
}

That is not currently possible. I understand the use case and it would make sense to support.

However, I’ve been working on and off on support jq and I think that might be better suited for complicated use cases like this. Granted, this is not a super complicated use case but I have to draw the line somewhere and I still have to figure out exactly where that is.

1 Like