My objective is to remove an array[] from an object. I couldn't able to figure out how to remove the particular array from the object. Can anyone help me with this query?
Here is the following object:
experience: [
{
organisation: "",
id: "",
from: "",
to: "",
skills: []
}
]
Experience array having an object, it may have multiple objects.
experience: [
{
organisation: "",
id: "",
from: "",
to: "",
skills: []
},
{
organisationName: "",
id: "",
from: "",
to: "",
skills: []
}
]
I want to remove the skills array from every object.
I have tried in this way but it is showing undefined.
let skillsArray = this.state.experiences.forEach((item) => item.skills! == Array.isArray([]))
Can anyone please help me with this query?