Hi All,
I wonder if somebody had tried this before, I have this response body:
{
"id": "GENE",
"tree": {
"children": [
{
"id": "GENE::8A20835E-5173-4007-A4AE-6AED501886CD",
"name": "ACTIVATING 1",
"children": [
{
"type": "MutaGroup",
"id": "GENE::6C4C71D9-C0B0-4DB6-A23F-40955566208B",
"name": "ACTIVATING 2",
"children": [
{
"type": "MutaGroup",
"id": "GENE::6E479405-7B48-4409-B9BD-839325CA1539",
"name": "ACTIVATING 3"
}
]
},
{
"type": "MutaGroup",
"id": "GENE::0C615FDA-E7A5-4940-8B8D-2CE866A95810",
"name": "ACTIVATING 4",
"children": [
{
"type": "MutaGroup",
"id": "GENE::F5D41514-98FF-11E9-A51F-91FA4247F9E3",
"name": "ACTIVATING 5"
}
]
}
]
}
],
"name": "GENE",
"id": "GENE::GENE"
},
"geneName": "GENE",
"version": 1
}
I was trying to use Response.json( [selector] ) to find for instance “name”: “ACTIVATING 5” and return its id “id”: “GENE::F5D41514-98FF-11E9-A51F-91FA4247F9E3”
I tried some of the suggested GJSON paths, for instance tree.children.#(name==“ACTIVATING 1”).id but it only works at the first level, is there a way to find values deeper in the Json body?