"name" : "a",
"type": "container",
"kids": [{
"name": "a1",
"type": "container",
"kids": [{
"name": "a2",
"type": "leaf",
"when": "../a"
}]
}]
}
in when condition i want to validate in node ->parent ->parent is "a" Now how to validate that condition
github.com/json-path/JsonPath. Also note that if that's the only check you need to implement, it's not necessary to rely on complex processing; instead, you can parse your JSON to a custom tree-like data strucure which would make the check you want to implement a no-brainer.