1

I have a very large json and I don't want to access a key with a very long filter (ie: a.b.c.d.e.f.g.key1). In the path there are not only scalar objects but also list.

Is there a way to write a filter in order to find a key wherever it is?

{ "a": { "b": { "c": { "d": { "e": { "f": {"g": { "key1": 3 }}}}}}}}
β.εηοιτ.βε
  • 33,893
  • 13
  • 69
  • 83
Riccardo79
  • 954
  • 4
  • 17
  • 35
  • 1
    if you are only interested in the value of the key, just convert the json to a string and do a string search for the key, you know that the value is what comes after `:` and until a `,` or `}` –  Feb 09 '22 at 13:23
  • That's my current solution. But I often use jmespath and I was wondering if it was possible to implement a search using this framework – Riccardo79 Feb 09 '22 at 14:50

0 Answers0