Turn product catalog rows into JSON objects
Send a small product table to a system that accepts an array of records.
Set up the example
Use the first CSV row as field names and convert the three records. Inspect the JSON value types before import.
Check the result
Check that every object has sku, item, units and zone. Validate whether the receiving system expects unit counts as strings or numbers.
Run this task
Use your own file or download the practice input below. The checks on this page describe the practice result.
Continue with a related task
- Remove duplicate CSV rows and export JSON
Remove exact duplicate rows → Convert the remaining rows to JSON objects
- Extract SQL INSERT values into a JSON fixture
Read INSERT values into a table → Use the column names as JSON keys
- Turn a CSV inventory into a YAML list
Convert header-based CSV rows to objects → Serialize the objects as a YAML sequence
- Find a trailing comma in a JSON fixture
- Normalize quoting in an inventory CSV
- Remove an exact duplicate inventory record