[ad_1]
You access an element in an array with an index starting from 0, like you noted.
Accessing a key in an object is just a matter of using the key name:
const secondBook = books[2];
[ad_2]
solved How to find objects by key in javascript object?