how can to merge two arrays to a single array of object
here's a sample source
{"event_date": ["a","b","c"],"values" : [1,2,3]}
i would like to have this format
{
"data" : [
{
"date": "a",
"value": 1
},
{
"date": "b",
"value": 2
},
{
"date": "c",
"value": 3
}
]
}
{
"data": $map($.event_date, function($v, $i) {
{
"date": $v,
"value": $.values[$i]
}
})
}
Playground link: https://jsonatastudio.com/playground/6bb3385e