Use the find() method: myArray.find(x => x.id === '45').foo;. From MDN: The find() method returns the first value in the array, if an element in the array ...
確定! 回上一頁