mirror of
https://github.com/public-apis/public-apis.git
synced 2025-07-02 01:07:45 +02:00
add entry count to final json
This commit is contained in:
parent
0f427d7829
commit
51a509d922
1 changed files with 3 additions and 0 deletions
|
@ -37,6 +37,7 @@ function handle(filename, anchor) {
|
||||||
var col_num = 0;
|
var col_num = 0;
|
||||||
var cols = [];
|
var cols = [];
|
||||||
var rows = [];
|
var rows = [];
|
||||||
|
var entry_count = 0;
|
||||||
|
|
||||||
function read_line() {
|
function read_line() {
|
||||||
return lines[cur_line++];
|
return lines[cur_line++];
|
||||||
|
@ -100,6 +101,7 @@ function handle(filename, anchor) {
|
||||||
|
|
||||||
}
|
}
|
||||||
rows.push(row);
|
rows.push(row);
|
||||||
|
entry_count++;
|
||||||
line = read_line()
|
line = read_line()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -113,6 +115,7 @@ function handle(filename, anchor) {
|
||||||
data.push(ele);
|
data.push(ele);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
root["count"] = entry_count;
|
||||||
root[table_name] = data;
|
root[table_name] = data;
|
||||||
}
|
}
|
||||||
console.log(JSON.stringify(root));
|
console.log(JSON.stringify(root));
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue