Markdown table to JSON
Documentation tables are often the only place a piece of reference data exists. Converting one to JSON turns it into something you can iterate over. Header cells become keys, each row becomes an object, and values that are plainly numbers or booleans are converted rather than left as strings.
format
how to use it
- 01Paste Markdown containing a table.
- 02Check the grid, since header names become JSON keys.
- 03Copy the JSON array.
questions
- What happens to duplicate or empty headers?
- They would silently overwrite each other as keys, so they are made unique instead: a second name becomes name_2, and an empty header becomes column_3.
- Is 00123 converted to a number?
- No. A leading zero means the value is an identifier, so it stays a string. The same applies to anything longer than 15 digits.
- Can I get an array of arrays instead?
- The object form is the default because it carries the header names. An array-of-arrays form is available for positional data.