다음이 객체 배열이라고 가정해 보겠습니다.
const details =[ { employeeFirstName:"John", employeeLastName:"Doe" }, { employeeFirstName:"David", employeeLastName:"Miller" }, { employeeFirstName:"John", employeeLastName:"Smith" } ]사전>예시
다음은 이름이 "John"인 경우 특정 값을 가져오는 코드입니다. -
const details =[ { employeeFirstName:"John", employeeLastName:"Doe" }, { employeeFirstName:"David", employeeLastName:"Miller" }, { employeeFirstName:"John", employeeLastName:"Smith" } ]for (var index =0; index