Henchway
6 years agoContributor
Retrieving a JSON object key with jsonPath
Hi everyone,
i’m having troubles retrieving the key of a JSON object which is usually possible via the ~ sign.
I hope the images render properly, this is possible via regular jsonPath, however i ...
- 6 years ago
Hi @Henchway,
I assumed that $…questions is a JSON Object. So for this input to the Mapper Snap:
,
I entered this expression in the Mapper:
$entity.value.design.questions.filter((value,key)=>value.label == "Target Application ID").keys()
and assigned it to the $key field. I then got this in the Mapper’s output:
If I am incorrect in my assumptions, perhaps you can provide us with sample input data you need processed in a textual format, so that I’d be able to work with that.
BR,
Dimitri