find one in array return one object javascript code example
Example: find object in array by property javascript
// Find an object with a given property in an array
const desiredObject = myArray.find(element => element.prop === desiredValue);
// Find an object with a given property in an array
const desiredObject = myArray.find(element => element.prop === desiredValue);