I wanted to get a value in an array without using absolute array positioning. Here is my json payload.
{
"xyz":{
"abc":[
{
"account":[
{
"value":"savings"
}
]
}
]
}
}
How to get the value savings using Data Weave..
You can also do that. I supposed you don't want to use at all indexes and that there is only one key value in the payload:
%dw 2.0
output application/json
var data = {"xyz": {"abc":["account":[{"value":"savings"}]]}}
---
data..value reduce $