I'm describing the output I'd like to have using jq
Here my json file
{
"partitions": [
{
"replicas": [
0,
1,
2
],
"log_dirs": [
"any",
"any",
"any"
]
},
{
"replicas": [
2,
0,
1
],
"log_dirs": [
"any",
"any",
"any"
]
},
[...]
I would like, for every object in partitions[] to replace the value of the i th string in log_dirs[] by its concatenation with the i th number in replicas[] in order to have something like this
{
"partitions": [
{
"replicas": [
0,
1,
2
],
"log_dirs": [
"any0",
"any1",
"any2"
]
},
{
"replicas": [
2,
0,
1
],
"log_dirs": [
"any2",
"any0",
"any1"
]
},
[...]