I am having array of objects like below,
let array = [
{
"config_id":"123",
"disable":"0",
"duration":1,
"endpoint":"",
"exit_status":null,
"handle":null,
"id":"63",
"info_from_system":"{\"failed_resource_request\":{\"keys\":{\"subtype\":{\"=\":[\"storage_node\"]},\"model\":{\"in\":[\"H500S\"]},\"type\":{\"=\":[\"hci\"]},\"cacheCard\":{\"=\":[\"Radian\"]}},\"job_id\":\"63\",\"pool_id\":\"7\",\"quantity\":\"1\",\"id\":\"496\"}",
"job_charge_id":"162",
"job_id":"63",
"priority":"8",
"product_version":null,
"workdir":null,
"workload_id":null
},
{
"config_id":"0987",
"disable":"0",
"duration":1,
"endpoint":"",
"exit_status":null,
"handle":null,
"id":"98",
"info_from_system":"{\"failed_resource_request\":{\"keys\":{\"subtype\":{\"=\":[\"storage_node\"]},\"model\":{\"in\":[\"H500S\"]},\"type\":{\"=\":[\"hci\"]},\"cacheCard\":{\"=\":[\"Radian\"]}},\"job_id\":\"63\",\"pool_id\":\"7\",\"quantity\":\"1\",\"id\":\"1234\"}",
"job_charge_id":"162",
"job_id":"98",
"priority":"8",
"product_version":null,
"workdir":null,
"workload_id":null
}
]
I need to remove double quotes to the key "id" (means, converting from string to Number) alone and not for other keys.
Tried the following method, but no luck.
array.replace(/\'/gid,"")
Is there anyway to achieve this. Any help will be much appreciated .