Javascript-object.entries
Javascript
Object.entries()
[key, value]쌍의 배열을 반환한다.const obj = { name: 'test', email: 'test@test.com'};
console.log(Object.entreis(obj));
console.log(Object.entries(obj)[1]);
// output
// [ ['name', 'test'], ['email', 'test@test.com'] ]
// ['email', 'test@test.com']
댓글
댓글 쓰기