What will the following code log?
const json = '[{"id":1},{"id":2}]'; console.log(JSON.parse(json)[0].id);
Error
undefined
1
null
This question is part of this quiz :