Current Article:

How to get JavaScript object from array by value of property

How to get JavaScript object from array by value of property

Find the value of the first element/object in the array, otherwise undefined is returned.

let result = jsObjects.find(obj => {
    return obj.b === 6
});

Check “find” function docs