find の存在を忘れるのでメモ
const family = [ {id: 1, name: 'Loid'}, {id: 2, name: 'Anya'}, {id: 3, name: 'Yor'}, ] const person = family.find(f => f.id === 2); console.info(person.name); //-> Anya
牌語備忘録 -pygo
find の存在を忘れるのでメモ
const family = [ {id: 1, name: 'Loid'}, {id: 2, name: 'Anya'}, {id: 3, name: 'Yor'}, ] const person = family.find(f => f.id === 2); console.info(person.name); //-> Anya