It would be interesting to use a jsonpath as the basis for a lookup into another object/array.
For example, given the json:
{
"object": {
"primaryKey": "foo",
"foo": "bar",
"other": "value"
},
"array": [
{ "foo": "one" },
{ "foo": "two" }
]
"prefs" { "fieldname": "other" },
"objIndex": 1
}
It might be handy to be able to:
$.object[ $.prefs.fieldname ] -> `"value"
$.object[ @.primaryKey ] -> "bar"
$.array[ $.objIndex ] -> { "foo": "two" }
It would be interesting to use a jsonpath as the basis for a lookup into another object/array.
For example, given the json:
{ "object": { "primaryKey": "foo", "foo": "bar", "other": "value" }, "array": [ { "foo": "one" }, { "foo": "two" } ] "prefs" { "fieldname": "other" }, "objIndex": 1 }It might be handy to be able to:
$.object[ $.prefs.fieldname ]-> `"value"$.object[ @.primaryKey ]-> "bar"$.array[ $.objIndex ]->{ "foo": "two" }