How can I map an array of objects with the same keys to subsequent keys with an incrementing integer as its postfix?
Input:
[
{
"test1": {},
"test1": {}
},
{
"test2": {},
"test2": {}
}
]
The above input receiving and expected output would be as below like each object set supposed to contain different combination of keys like (test1 and test2)
Expected Output:
[
{
"test1": {},
"test2": {}
},
{
"test1": {},
"test2": {}
}
]