this is the sample json format in my application.
my arr = [
{
"id": 12,
"creationTimestamp": "2021-09-15 15:01:11",
"groupName": "one",
"$$hashKey": "object:15"
},
{
"id": 13,
"creationTimestamp": "2021-09-15 15:01:14",
"groupName": "two",
"$$hashKey": "object:16"
},
{
"id": 14,
"creationTimestamp": "2021-09-15 15:01:19",
"groupName": "three",
"$$hashKey": "object:17"
}
]
according to my requirement i need to change id --> groupId. After i need to assign it for the new array
my array2 [
{
"groupId": 12,
"creationTimestamp": "2021-09-15 15:01:11",
"groupName": "one",
"$$hashKey": "object:15"
},
{
"groupId": 13,
"creationTimestamp": "2021-09-15 15:01:14",
"groupName": "two",
"$$hashKey": "object:16"
},
{
"groupId": 14,
"creationTimestamp": "2021-09-15 15:01:19",
"groupName": "three",
"$$hashKey": "object:17"
}
]
how i do this modification using java script