how to select array element via id and print it code example Example: javascript get array object by id myArray.find(x => x.id === '45').foo;