From 51a509d922f922ef37ade2b322daa952bb2ad9fa Mon Sep 17 00:00:00 2001 From: Dave Machado Date: Thu, 3 Aug 2017 15:28:17 -0400 Subject: [PATCH] add entry count to final json --- build/md2json.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/build/md2json.js b/build/md2json.js index 624d486c..dd2112ba 100644 --- a/build/md2json.js +++ b/build/md2json.js @@ -37,6 +37,7 @@ function handle(filename, anchor) { var col_num = 0; var cols = []; var rows = []; + var entry_count = 0; function read_line() { return lines[cur_line++]; @@ -100,6 +101,7 @@ function handle(filename, anchor) { } rows.push(row); + entry_count++; line = read_line() } @@ -113,6 +115,7 @@ function handle(filename, anchor) { data.push(ele); } } + root["count"] = entry_count; root[table_name] = data; } console.log(JSON.stringify(root));