If you are looking for a simple example of nested JSON for testing purposes, then you have come to the right place. 

You can copy and paste the following JSON into a file or use it directly in your application. Alternatively, you can download the JSON file and then use it. You can also copy the JSON URL and use it directly in your application.

Product nested json file


Url:https://www.quickpickdeal.com/jsonfile/product_nested_json_file.json

Click here to download this file
{
    "productnumber": "696055254927",
    "title": "Star Wars - Boba Fett Case for iPhone 6",
    "producttype": "HardGood",
    "listprice": "12.99",
    "category": [
      {
        "name": "Cell Phones"
      },
      {
        "name": "Cell Phone Accessories"
      },
      {
        "name": "iPhone Accessories"
      },
      {
        "name": "iPhone Cases & Clips"
      },
      {
        "name": "iPhone 6 Cases"
      }
    ],
    "description": "Compatible with Apple iPhone  6; camera cutout; Star Wars design",
    "model": "696055254927",
    "image": "http://img.bbystatic.com/BestBuy_US/images/products/5003/5003413_sa.jpg"
  }

JSON object represents information about a product. Let's break down the key-value pairs:

  • productnumber: "696055254927" A unique identifier for the product.
  • title: "Star Wars - Boba Fett Case for iPhone 6" The title or name of the product.
  • producttype: "HardGood" Indicates the type of product; in this case, it's a hard good.
  • listprice: "12.99" The listed price of the product.
  • category: An array of category objects, each with a "name" property.The product is categorized under "Cell Phones," "Cell Phone Accessories," "iPhone Accessories," "iPhone Cases & Clips," and "iPhone 6 Cases."
  • description: "Compatible with Apple iPhone 6; camera cutout; Star Wars design" A description of the product, providing information about compatibility and design features.
  • model: "696055254927" The model number of the product.
  • image: "http://img.bbystatic.com/BestBuy_US/images/products/5003/5003413_sa.jpg" , A URL pointing to the image of the product.
This JSON structure provides comprehensive details about a specific product, including its identification, type, price, category, description, model, and an image URL for reference.
Download shop json file


Here is another nested sample JSON file that has a list of restaurants

Url:https://www.quickpickdeal.com/jsonfile/shop_nested_json_file.json

Click here to download this file
{
    "name": "Black Elephant",
    "outcode": null,
    "rating": "5.5",
    "foodtype": "Chinese",
    "Address": {
      "address": "23 Ashfield Parade",
      "address line 2": null,
      "zipcode": "5EH"
    }
  } 
The above JSON represents details about a restaurant named "Black Elephant." Let's break down the information:

  • name: "Black Elephant" The name of the restaurant.
  • outcode: first part of a postcode
  • rating: "5.5" The rating of the restaurant, possibly on a scale from 1 to 10.
  • foodtype: "Chinese" ,Indicates the type of cuisine served at the restaurant, in this case, Chinese.
  • Address: An object providing address details:
  • address: "23 Ashfield Parade" ,The street address of the restaurant.
  • address line 2: Additional address information, which is not specified in this case.
  • zipcode: "5EH",The postal code or ZIP code associated with the restaurant's location.
In summary, the JSON provides information about a restaurant called "Black Elephant," including its name, rating, the type of cuisine (Chinese), and address details such as street address and postal code.

An example of a nested JSON with a list containing 20 items in an array, each with some dummy information:



{
  "outerKey1": "outerValue1",
  "outerKey2": "outerValue2",
  "nestedObject": {
    "innerKey1": "innerValue1",
    "innerKey2": "innerValue2",
    "innerArray": [
      {"item": {"name": "Item 1", "quantity": 10, "price": 20.99}},
      {"item": {"name": "Item 2", "quantity": 5, "price": 15.75}},
      {"item": {"name": "Item 3", "quantity": 8, "price": 12.50}},
      {"item": {"name": "Item 4", "quantity": 15, "price": 30.25}},
      {"item": {"name": "Item 5", "quantity": 12, "price": 18.99}},
      {"item": {"name": "Item 6", "quantity": 7, "price": 25.50}},
      {"item": {"name": "Item 7", "quantity": 20, "price": 22.75}},
      {"item": {"name": "Item 8", "quantity": 3, "price": 10.00}},
      {"item": {"name": "Item 9", "quantity": 6, "price": 16.50}},
      {"item": {"name": "Item 10", "quantity": 4, "price": 14.25}},
      {"item": {"name": "Item 11", "quantity": 18, "price": 28.99}},
      {"item": {"name": "Item 12", "quantity": 9, "price": 19.75}},
      {"item": {"name": "Item 13", "quantity": 11, "price": 21.50}},
      {"item": {"name": "Item 14", "quantity": 13, "price": 24.99}},
      {"item": {"name": "Item 15", "quantity": 2, "price": 8.50}},
      {"item": {"name": "Item 16", "quantity": 17, "price": 26.75}},
      {"item": {"name": "Item 17", "quantity": 14, "price": 23.00}},
      {"item": {"name": "Item 18", "quantity": 1, "price": 5.99}},
      {"item": {"name": "Item 19", "quantity": 16, "price": 27.25}},
      {"item": {"name": "Item 20", "quantity": 19, "price": 29.50}}
    ]
  }
}
In this example, each item in the "innerArray" has a nested structure with information such as "name," "quantity," and "price."