JSON[] tabulator

tabulates a JSON array with representing elements structures by using table header spans.

An input should be an T[] where:

type T = TLeaf | TNode

type TLeaf
  = boolean | string | number
  | T[] /* arrays */

type TNode
  = { [key: string]: T } /* objects */
  | [string, T][] /* key-value pairs */