indexOf method in an object array? September 9, 2022 by Tarik I think you can solve it in one line using the map function: const pos = myArray.map(e => e.hello).indexOf('stevie');