get id of an object an return the object js code example Example: javascript get array object by id myArray.find(x => x.id === '45').foo;