I have a JSON like this
{
"a" : 1,
"key_to_find" : "value_of_key",
"nested" : {
"value_of_key" : "real_value",
"b" : 2
}
}
I want to create a JSON Path expression to get "real_value", but I don't now the key "value_of_key" so I need to dynamically reference it. I tried something like:
$.nested['$.key_to_find']
but it doesn't work. How can I reference to root element value as key to get children values? Is that possible?
I need to use it inside AWS Step Functions, so no programming languages/libraries can be used.