Skip to content
jsonblocks

Sample JSON array of objects

A uniform product catalog: three objects with identical keys and deliberately mixed types. Ideal for testing converters, tables, and search - copy it or open it in the viewer.

Open in viewer

Arrays of uniform objects are the workhorse shape of data exchange: CSV rows, database results, and API collections all reduce to this form. Uniform keys make the shape convertible; the mixed types make it interesting.

The document

json
[
  {
    "sku": "WIDGET-001",
    "name": "Blue widget",
    "price": 49.99,
    "inStock": true,
    "tags": ["sale", "new"],
    "rating": null
  },
  {
    "sku": "WIDGET-002",
    "name": "Red widget",
    "price": 39.5,
    "inStock": false,
    "tags": [],
    "rating": 4.8
  },
  {
    "sku": "WIDGET-003",
    "name": "Green widget",
    "price": 59,
    "inStock": true,
    "tags": ["eco"],
    "rating": 4.9
  }
]

What to notice

  • Uniform keys across rows: sku, name, price, inStock, tags, rating - perfect CSV columns.
  • Deliberate variety: an empty tags array, a null rating, integer-looking and decimal prices.
  • Index addressing: the second product lives at $[1], its price at $[1].price.

Try it with the tools

  1. Paste it into JSON to CSV to get a 3-row spreadsheet with detected headers.

  2. Open it in the path finder to browse all 25 paths and copy $[2].tags[0].

  3. Load it in the viewer to see repeated shapes collapse automatically.

Frequently asked questions

How do I open this example in the viewer?

Use the open-in-viewer link on this page: it loads this exact document into the block visualizer with repeated shapes pre-collapsed.

Why do converters want uniform objects?

CSV and tables need one column set for all rows. Uniform keys become headers directly; ragged objects force empty cells or dropped fields.

How do I address one row?

By index from zero: $[0] is the blue widget, $[2].name is Green widget. Array indices toggle on and off in the viewer.