javascript how to search for a value within an array code example Example: find a single element in array of objects javascript myArray.find(x => x.id === '45').foo;