I have an array of objects, where each object is structured as:
{
"impl": "pmdk",
"pc_writes": 50,
"threads": 1,
"throughput (K tps)": 703014,
"med_latency (ns)": 1334,
"99_latency (ns)": 2358,
"exec_time (s)": 14224471006
}
I would like to divide the "throughput (K tps)" field in each object by 1000 and return the array in the same format. I tried using map_values in the following way:
map_values(."throughput (K tps)"/1000)
But it only returns an array of modified values as:
[703.014,...]
Instead of the entire objects, like this:
[{
"impl": "pmdk",
"pc_writes": 50,
"threads": 1,
"throughput (K tps)": 703.014,
"med_latency (ns)": 1334,
"99_latency (ns)": 2358,
"exec_time (s)": 14224471006
},
...
]
How do I return an array of objects after dividing one of its fields by 1000?