JSONPath get the id of a parent element by a sub-child value
I could only solve the first part of my question by using:
$['datapoints'][*][?(@['default.name']=='Delta_K')]
During my research I found that jsonpath does not support to get the parent of a filtered node. In Chapter 7 "Conclusion" of http://www.baeldung.com/guide-to-jayway-jsonpath it's written:
Although JsonPath has some drawbacks, such as a lack of operators for reaching parent or sibling nodes, it can be highly useful in a lot of scenarios.
Also further SO posts couldn't help me.
- Getting parent of matched element with jsonpath
- Using jsonpath to get parent node