Skip to content

Instantly share code, notes, and snippets.

@antonmedv
Created September 14, 2020 14:18
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save antonmedv/04c179729852044e8bdf21aa959748e5 to your computer and use it in GitHub Desktop.
Save antonmedv/04c179729852044e8bdf21aa959748e5 to your computer and use it in GitHub Desktop.
fx snippet for table output on JSON
global.table = (json) => {
let Table = require('cli-table3')
let table = new Table({head: Object.keys(json[0])});
table.push(...json.map(Object.values))
return table.toString()
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment