Attempting to parse a property within nested objects and an array using JSON.parse(nodeInfluxSeries)
. Here's the structure:
Array [
Object {
"id": 1,
"properties": Object {
"nodeInfluxSeries": "[{\"database\": \"boba\", \"fields\": [], \"measurement\": \"boba\", \"retentionPolicy\": \"boba\", \"tags\": {\"nodeId\": \"boba\"}}]",
"series": "",
"version": "",
},
"userRights": Object {
"monitorManagement": true,
"propertyEdit": Object {},
},
},
]
Attempted the following, but it adds a new property to the first object.
note: random refers to the array
random.map(r => {
return {
...r,
nodeInfluxSeries: JSON.parse(c.properties.nodeInfluxSeries),
};
})