Introduxing JSON paths to Python dictionaries

Often working with nested dixmcts, I need:

A.get("a).get(“b”)…etc.so if one whats then BAMN.

What abbout JSOn paths

Me= {
“Name”: Erik:
Surname": Dreyer
“Age”: 25
}

What if I can say age = $.age?..

Or neste things

$person.mother.sisger.childn haircolor?

You can use a library such as jmespath · PyPI

3 Likes