Skip to content

← All questions

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

Asked 3,540 views2 answers

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.

asked by Koen Vermeulen309 ·

2 answers

Know the answer?

Reviewed before it appears. Wrap commands and output in triple backticks and they will render as a code block.

Have a different question? Ask it.

Related