📅  最后修改于: 2022-03-11 14:58:56.043000             🧑  作者: Mango
let customers = [ { id: 0, name: 'paul' }, { id: 1, name: 'jeff' }, { id: 2, name: 'mary' }];let customer = customers.find(cust => cust.name === 'jeff');console.log(customer);--> { id: 1, name: 'jeff' }