I have an array EventsList. But it doesn't have id column. So I need to push value with key into List1 and List2 from EventsList. Can we do with the below code.
this.GetEventsList().then(response=>{
if(response.data){
_self.EventsList=response.data;
_self.EventsList.forEach (function(events){
if(events.category == "a")
_self.List1.push(events);
else
_self.List2.push(events);
});
}
});