Skip to content

Instantly share code, notes, and snippets.

@mmeyers00
Last active January 23, 2019 16:27
Show Gist options
  • Save mmeyers00/0f2aed55d8a20b58295dddff9f2df338 to your computer and use it in GitHub Desktop.
Save mmeyers00/0f2aed55d8a20b58295dddff9f2df338 to your computer and use it in GitHub Desktop.

Revisions

  1. mmeyers00 revised this gist Jan 23, 2019. 1 changed file with 2 additions and 3 deletions.
    5 changes: 2 additions & 3 deletions exec.js
    Original file line number Diff line number Diff line change
    @@ -1,7 +1,6 @@
    const { execSync } = require('child_process');

    let result = execSync("sqlite3 -header -csv test.db 'select * from testing' | csv2json -d");

    let obj = JSON.parse(result.toString().trim());
    let result = execSync("sqlite3 -header -csv test.db 'select * from testing' | csv2json -d"),
    obj = JSON.parse(result.toString().trim());

    console.log(obj);
  2. mmeyers00 created this gist Jan 23, 2019.
    7 changes: 7 additions & 0 deletions exec.js
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,7 @@
    const { execSync } = require('child_process');

    let result = execSync("sqlite3 -header -csv test.db 'select * from testing' | csv2json -d");

    let obj = JSON.parse(result.toString().trim());

    console.log(obj);