[ad_1]
I encountered a little issue when I’m trying to map on an array, which contents many objects.
I want, with a Switch, return only when my object has a key defined.
Ex:
if (d['Niveau sonore']) {
console.log(d['Niveau sonore']);
return d['Niveau sonore'];
}
return '';
})}
But the problem, is in my array I have many objects with the same key ‘Niveau sonore’ for example, and I just want to return only one value.
How can I do that, I thought with Lodash it was possible but I did not succeed.
If you have a tip 😉 thank you very much.🙏
[ad_2]