Is it possible to use the javascript \"Set\" object to find an element with a certain key? Something like that:
let myObjects = [{\"name\":\"a\", \"value\":0
You may just want a Set of names:
let myObjects = [{"name":"a", "value":0}, {"name":"b", "value":1},{"name":"c", "value":2}];
let map = new Set(myObjects.map(el=>el.name));
console.log(map.has("a"));
If you want to get an object by name,thats what a Map is for:
let myObjects = [{"name":"a", "value":0}, {"name":"b", "value":1},{"name":"c", "value":2}];
let map = new Map(myObjects.map(el=>[el.name,el]));
console.log(map.get("a"));