I am using reactjs have the following data below and I want to loop through the array then if key === "oneline" or key === "twoline" remove the entire object.
In this example after removing the two objects (transformation), based on the description above it will only return objects with 0 and 3 inside the array.
const data = [
{0: {key: "zeroline", door: "zero"}},
{1: {key: "oneline", door: "one"}},
{2: {key: "twoline", door: "two"}},
{3: {key: "threeline", door: "three"}},
]
Any help would be very helpful.
.filterfor this: developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/…