var entries = [
{
"item": "something",
"steps": [{
"node": {"name": "test0"},
"status": {"name": "test"},
"time": {"name": "test"}
},{
"node": {"name": "test1"},
"status": {"name": "test"},
"time": {"name": "test"}
}]
}
];
customList = []
entries.forEach(data => {
data.steps.forEach(step => {
if (customList.indexOf(step.node.name) === -1) {
customList.push(step.node.name)
}
});
});
I am attempting to append the name to a list only if it is not already present in the list. However, the code provided above seems to be malfunctioning.