What I think about better approach is:

{
    "author": "No Name",
    "title": "Wonderful Journey",
    "publishedDate": "17-03-2019",
    "country": "German",
    "city": "Berlin",
    "publisher": "Publisher Name",
    "chapters": [
        {
            "id": 1,
            "title": "Journey Begin",
            "pages": [
                {
                    "id": 1,
                    "picture": "City_Building.png",
                    "content": "Something else...",
                    "footnote": "Something important..."
                },
                {
                    "id": 2,
                    "picture": "City_Building.png",
                    "content": "Something else...",
                    "footnote": "Something important..."
                }
            ]
        }
    ]
}

You can save it as JSON file like book.json and call JSON file from Javascript like this:

var book = undefined,
    getBook = new XMLHttpRequest();

getBook.onreadystatechange(function() {
    if(this.readyState == 4 && this.status == 200) {
        book = JSON.parse(this.responseText);

        // get author of book
        console.log(book.author);

        // get content of chapter 1 page 1
        console.log(book.chapters[0].pages[0].content);

        // get footnote of chapter 1 page 2
        console.log(book.chapters[0].pages[1].footnote);
    };

getBook.open('GET', 'book.json');
getBook.send();

For information about ajax you can follow this link.

Answer from A Naive Dreamer on Stack Overflow
Top answer
1 of 2
2

What I think about better approach is:

{
    "author": "No Name",
    "title": "Wonderful Journey",
    "publishedDate": "17-03-2019",
    "country": "German",
    "city": "Berlin",
    "publisher": "Publisher Name",
    "chapters": [
        {
            "id": 1,
            "title": "Journey Begin",
            "pages": [
                {
                    "id": 1,
                    "picture": "City_Building.png",
                    "content": "Something else...",
                    "footnote": "Something important..."
                },
                {
                    "id": 2,
                    "picture": "City_Building.png",
                    "content": "Something else...",
                    "footnote": "Something important..."
                }
            ]
        }
    ]
}

You can save it as JSON file like book.json and call JSON file from Javascript like this:

var book = undefined,
    getBook = new XMLHttpRequest();

getBook.onreadystatechange(function() {
    if(this.readyState == 4 && this.status == 200) {
        book = JSON.parse(this.responseText);

        // get author of book
        console.log(book.author);

        // get content of chapter 1 page 1
        console.log(book.chapters[0].pages[0].content);

        // get footnote of chapter 1 page 2
        console.log(book.chapters[0].pages[1].footnote);
    };

getBook.open('GET', 'book.json');
getBook.send();

For information about ajax you can follow this link.

2 of 2
1

You can't do var lastSentence = chapter.page.sentence.text because sentence in your structure is an array, so when you want to access text property, you need to specify the index: chapter.page.sentence[index].text

If you want to get text from the latest sentence, you can use .length property of array.

var lastSentence = chapter.page.sentence[chapter.page.sentence.length - 1].text

Note, that I used length - 1 because array indexes start from 0, e.g. Array [1, 2, 3] has 3 elements with indexes 0, 1, 2

🌐
Jsonld
jsonld.com › home › book
Book Schema JSON-LD -- Validated Markup for Print and eBooks
May 1, 2026 - { "@context": "https://schema.org", "@type": "WebPage", "breadcrumb": "Books > Marketing > JSON", "mainEntity":{ "@type": "Book", "author": "http://www.example.com/author.html", "bookFormat": "http://schema.org/EBook", "datePublished": "2015-05-01", "image": "coverImage.jpg", "inLanguage": "English", "isbn": "00000000", "name": "The Title of Book", "numberOfPages": "1234", "offers": { "@type": "Offer", "availability": "http://schema.org/InStock", "price": "9.99", "priceCurrency": "USD" }, "publisher": "O'Json Publishing", "aggregateRating": { "@type": "AggregateRating", "ratingValue": "4", "reviewCount": "12" } } }
People also ask

How can personalized JSON books complement these expert recommendations?
Personalized books tailor expert knowledge to your background and goals, bridging general principles with your specific needs. They complement titles like "JSON at Work" perfectly. Learn more here.
🌐
bookauthority.org
bookauthority.org › books › software development and devops › software development › json
7 JSON Books That Accelerate Your Coding Mastery - BookAuthority
Are these books too advanced for someone new to JSON?
Not at all. Titles like "Json for Beginners" and "JSON and AJAX with JavaScript for beginners" are designed specifically for those just starting, guiding you step-by-step.
🌐
bookauthority.org
bookauthority.org › books › software development and devops › software development › json
7 JSON Books That Accelerate Your Coding Mastery - BookAuthority
Which books focus more on theory vs. practical application?
"JSON at Work" balances theory with real-world integration, while "JSON and AJAX with JavaScript for beginners" leans heavily on hands-on projects and practical examples.
🌐
bookauthority.org
bookauthority.org › books › software development and devops › software development › json
7 JSON Books That Accelerate Your Coding Mastery - BookAuthority
🌐
Bitmark
docs.bitmark.cloud › book
bitmark Documentation - Book JSON
{ "title": "Book Title", "subtitle": "Book Subtitle", "subject": "German as a Foreign Language", "format": "Integrated course and work book", "description": "Short description of this book by the publisher.", "type": "book", "format": "bitmark--", "kind": "collection", "isLiveBook": false, "isSmartBook": false, "isHighQuality": true, "coverImage": { "width": 700, "height": 1000, "src": "https://cdn.bitmark.cloud/books/com.firstpub.book98789/cover.jpg", "src1x": "https://cdn.bitmark.cloud/books/com.firstpub.book98789/cover@1x.jpg", "src2x": "https://cdn.bitmark.cloud/books/com.firstpub.book9878
🌐
GitHub
github.com › benoitvallon › 100-best-books › blob › master › books.json
100-best-books/books.json at master · benoitvallon/100-best-books
An website to play with the 100 best classical books of all time http://www.100bestbooks.xyz - 100-best-books/books.json at master · benoitvallon/100-best-books
Author: benoitvallon
🌐
JSON Formatter
jsonformatter.org › 629cf5
book-data
JSON Example with all data types including JSON Array.
🌐
BookAuthority
bookauthority.org › books › software development and devops › software development › json
7 JSON Books That Accelerate Your Coding Mastery - BookAuthority
June 24, 2025 - Lindsay Bassett has a passion for writing, teaching, and technology. Her online courses and books cater to busy IT professionals with a knack for turning technical subjects into enjoyable reading. 2015·124 pages·JavaScript, JSON, Software Development, Programming, Data Interchange
🌐
O'Reilly
oreilly.com › library › view › java-cookbook-3rd › 9781449338794 › ch19.html
19. Processing JSON Data - Java Cookbook, 3rd Edition [Book]
IntroductionEasy Database Access with JPA and/or HibernateJDBC Setup and ConnectionConnecting to a JDBC DatabaseSending a JDBC Query and Getting ResultsUsing JDBC Prepared StatementsUsing Stored Procedures with JDBCChanging Data Using a ResultSetStoring Results in a RowSetChanging Data Using SQLFinding JDBC MetadataProgram: SQLRunner · IntroductionGenerating JSON DirectlyParsing and Writing JSON with JacksonParsing and Writing JSON with org.json
Find elsewhere
🌐
JsonStudio
jsonstudio.io › samples › library-management-system-json
Library management system JSON | JsonStudio Samples
This JSON represents information about a book, including its title, author, ISBN, publisher, publication date, genre, availability status, and borrowe...
🌐
Kaggle
kaggle.com › code › prathammalvia › books-data-analysis-json-data
Books Data Analysis (JSON data) | Kaggle
August 5, 2023 - Explore and run AI code with Kaggle Notebooks | Using data from No attached data sources
🌐
Joepucc
joepucc.io › static_assets › projects › comp521 › A5.html
A5
In this assignment you will design a database and write functions to query it. I have provided data for 999 books from Tar Heel Reader. The books are provided in JSON format which is easy to read in Python.
🌐
GitHub
gist.github.com › mithicher › cba0358aa205abc9795e33510a876aa6
Sample Books Json Data · GitHub
Sample Books Json Data. GitHub Gist: instantly share code, notes, and snippets.
🌐
Microsoft Learn
learn.microsoft.com › en-us › sql › relational-databases › json › import-json-documents-into-sql-server
Import JSON Documents - SQL Server | Microsoft Learn
February 21, 2024 - SELECT book.* FROM OPENROWSET(BULK 'C:\JSON\Books\books.json', SINGLE_CLOB) AS j CROSS APPLY OPENJSON(BulkColumn) WITH ( id NVARCHAR(100), name NVARCHAR(100), price FLOAT, pages_i INT, author NVARCHAR(100) ) AS book; In this example, OPENROWSET(BULK) reads the content of the file and passes that content to the OPENJSON function with a defined schema for the output. OPENJSON matches properties in the JSON objects by using column names. For example, the price property is returned as a price column and converted to the float data type.
🌐
O'Reilly
oreilly.com › library › view › beginning-json › 9781484202029
Beginning JSON [Book]
March 4, 2015 - Beginning JSON provides you with the skill set required for reading and writing properly validated JSON data. The first two chapters of the book will discuss the foundations of JavaScript for those who need it, and provide the necessary understandings for later chapters.
Author: Ben Smith
Published: 2015
Pages: 324
🌐
GitHub
github.com › ernestas-poskus › data-structures › blob › master › JSON › Bookstore.json
data-structures/JSON/Bookstore.json at master · ernestas-poskus/data-structures
{ "Books": [ { "ISBN":"ISBN-0-13-713526-2", "Price":85, "Edition":3, "Title":"A First Course in Database Systems", "Authors":[ {"First_Name":"Jeffrey", "Last_Name":"Ullman"}, {"First_Name":"Jennifer", ...
Author: ernestas-poskus
🌐
Janicezhw
janicezhw.github.io › gitbook › startusegitbook › configInfo › bookjson.html
book.json · Sample GitBook - WK's Blog
{ // Folders to use for output // Caution: it overrides the value from the command line // It's not advised this option in the book.json "output": null, // Generator to use for building // Caution: it overrides the value from the command line // It's not advised this option in the book.json "generator": "site", // Book metadats (somes are extracted from the README by default) "title": null, "description": null, "isbn": null, // For ebook format, the extension to use for generation (default is detected from output extension) // "epub", "pdf", "mobi" // Caution: it overrides the value from the c
🌐
TutorialsPoint
tutorialspoint.com › json › json_quick_guide.htm
JSON - Quick Guide
JSON syntax is basically considered as a subset of JavaScript syntax; it includes the following − · Data is represented in name/value pairs. Curly braces hold objects and each name is followed by ':'(colon), the name/value pairs are separated by , (comma). Square brackets hold arrays and values are separated by ,(comma). ... { "book": [ { "id": "01", "language": "Java", "edition": "third", "author": "Herbert Schildt" }, { "id": "07", "language": "C++", "edition": "second", "author": "E.Balagurusamy" } ] }
🌐
Redis
redis.io › learn › develop › java › redis-and-spring-course › lesson_5
Books, Categories & The Catalog
January 31, 2025 - curl --location --request GET 'http://localhost:8080/api/books/' The result is an array of JSON objects containing the books:
🌐
Open Library
openlibrary.org › dev › docs › json_api
Open Library JSON API | Open Library
September 5, 2022 - For example, there is /type/edition which represents all of the information about a book, and type/edition/isbn_10 which is the property for the 10-character ISBN in the edition record. To find objects matching a particular query, send a GET request to http://openlibrary.org/api/things with ...