javascript
Javascript Map and Filter together
data
.filter(item => item.workFrontAnomalyTypeId === this.WorkFrontAnomalyTypeId)
.map(anomaly => ({
name: anomaly.name,
id: anomaly.id,
active: anomaly.active,
workFrontAnomalyTypeId: anomaly.workFrontAnomalyTypeId,
impedative: anomaly.impedative
}));
Was this helpful?
Similar Posts