Google Books API から書籍のリストを取得しました。JSON オブジェクトを localStorage に保存してから、オブジェクトで再度解析しました。
var books = JSON.parse(localStorage.books);
ここで、ブック ID に基づいて、その特定のブック エントリの情報を取得したいと考えています。特定の書籍の ID を見つけてリストに表示することはできましたが、書籍の ID とその書籍に関する残りの情報との関連付けはありますか? はいの場合、特定の書籍のすべてのデータをその ID から取得するにはどうすればよいでしょうか?
JSON サンプルデータの完全な API の例
{
"kind": "books#volume",
"id": "HGsoQKfXs90C",
"etag": "O6jaKOAAZvI",
"selfLink": "https://www.googleapis.com/books/v1/volumes/HGsoQKfXs90C",
"volumeInfo": {
"title": "John D. Rockefeller",
"subtitle": "Anointed with Oil",
"authors": [
"Grant Segall"
],
"publisher": "Oxford University Press",
"publishedDate": "2001-02-08",
"description": "Chronicles the life and accomplishments of the philanthropist and industrialist who founded the Standard Oil Company.",
"industryIdentifiers": [
{
"type": "ISBN_10",
"identifier": "0195121473"
},
{
"type": "ISBN_13",
"identifier": "9780195121476"
}
],
"pageCount": 128,
"dimensions": {
"height": "25.00 cm",
"width": "23.10 cm",
"thickness": "1.50 cm"
},