I have the following object:
const jj = {
"type": "doc",
"content": [{
"type": "paragraph",
"content": [{
"type": "text",
"text": "HI \n"
}, {
"type": "text",
"marks": [{
"type": "link",
"attrs": {
"href": "https://infosysta-my.sharepoint.com/:x:/p/elie%5Fiskandar/EXmik99OQBBNiJua1zbbiUIBwU8QEVOzyXl3qRV3ZnhADw",
"__confluenceMetadata": null
}
}],
"text": "Client List - MW.xlsx"
}]
}, {
"type": "paragraph",
"content": [{
"type": "text",
"text": "regards,"
}]
}],
"version": 1
};
I need to remove the "__confluenceMetadata":null
key/value so the new object will be:
const jj = {
"type": "doc",
"content": [{
"type": "paragraph",
"content": [{
"type": "text",
"text": "HI \n"
}, {
"type": "text",
"marks": [{
"type": "link",
"attrs": {
"href": "https://infosysta-my.sharepoint.com/:x:/p/elie%5Fiskandar/EXmik99OQBBNiJua1zbbiUIBwU8QEVOzyXl3qRV3ZnhADw"
}
}],
"text": "Client List - MW.xlsx"
}]
}, {
"type": "paragraph",
"content": [{
"type": "text",
"text": "regards,"
}]
}],
"version": 1
};
I tired to iterate through the elements using let arr = Object.entries(ADFDocJson);
but I couldn't reach what I needed.
I am looking for a generic method to use as this is just an example object and there might be multiple objects in the marks
array.