jQuery addClass example

Change class name on click in jQuery

by m4xout

JavaScript

let arr = [
    { name:"string 1", value:"this", other: "that" },
    { name:"string 2", value:"this", other: "that" }
];

let obj = arr.find(o => o.name === 'string');

console.log(obj);