Skip to content

← All questions

products.json must contain an array of rows (or { rows: [...] }) — mine is keyed by sku

Example threads. These questions and answers were written by the SDODS team to document real problems and how to fix them. The people named are illustrative, not real users. Questions asked on this site are marked new.

The export from our catalogue service is an object keyed by sku, which is the shape everything downstream of it expects:

json
{
  "SKU-1": { "name": "Backpack", "price": 29.99 },
  "SKU-2": { "name": "Bike light", "price": 9.99 }
}

Pointing a dataset at it gives:

text
✖ CONFIG_INVALID: /work/shop/projects/shop/data/common/products.json must contain an array of rows (or { rows: [...] }).

Odd part: sdods data preview on the same file does not complain at all. So one of the two is wrong about the file and I would like to know which.

2 answers

Know the answer?

Wrap commands and output in triple backticks and they will render as a code block.

Checking whether you’re signed in…

Have a different question? Ask it.

Related