I have a JSON object with two arrays. Using jmespath, I want to build a new object using one array as keys and another as values. Similar to array_combine in PHP.
For example, here is the input:
{ "keys": [ "a", "b", "c" ], "values": [ 1, 2, 3 ] }
And here is the result that I expect:
{ "a": 1, "b": 2, "c": 3 }
Is there a built-in function to achieve this?
source share