I wonder if there is a more elegant way of doing this. Suppose i have an array of objects like this:
a = [ { \"id\": \"kpi02\", \"value\": 10 },
Another nice alternative is using .filter with .includes:
var result = a.filter(item => kpis.includes(item.id))