객체 = {
"id": 1,
"name": "Alex",
"team": "engineering",
"position": "IOS Developer",
"emailAddress": "alex@google.com",
"phoneNumber": "010-xxxx-xxxx",
"admissionDate": "2018/12/10",
"birthday": "1994/11/08",
"profileImage": "profile1.png"
}
Object.keys(객체).forEach((prop) => {
console.log(객체[prop]);
});
특정 객체의 모든 프로퍼티를 조회
각 프로퍼티의 이름(key)-값(value) 쌍을 담은 배열을 리턴하는 메소드
console.log(Object.entries(객체));
for (const 프로퍼티 in 객체) {
console.log(`Key: ${프로퍼티} => Value: ${객체[프로퍼티]}`);
}