I have a json fragment with an array of keys and a separate array of values. Key 1 should match up to Value 1, etc. I'm trying to reformat with jq but not having much luck.
Original JSON:
{
"result": {
"event.KeyValues{}.Key": [
"name",
"gender",
"employee",
"email"
],
"event.KeyValues{}.Value": [
"tyler",
"male",
"yes",
"[email protected]"
],
"foo": "1",
"bar": "2"
}
}
Desired Output:
{
"name": "tyler",
"gender": "male",
"employee": "yes",
"email": "[email protected]"
}