I would like to convert ALL arrays in a json via JOLT to a list of key-value pairs:
input:
"ex":{"arr": ["1", "2", "3", "4"]}
desired output:
"ex-arr-0": "1", "ex-arr-1": "2", ...
Spec
[ { "operation": "shift", "spec": { "ex": { "arr": { "*": "ex-arr-&" } } } } ]
i solved it via the following:
{ "*": { "ex": {"*": {"*": "&3.&2-&1-&"}} } }