Added support for property filtering to the JSON output

merge-requests/1/head
Olivier Tremblay 4 years ago
parent c8461326a1
commit 855a8aad33

@ -335,7 +335,12 @@ function onLoadDOM(dom) {
return;
}
if (outputJSON){
writeStream.write(JSON.stringify(article));
var result = {};
for (propkey in wantedProperties) {
let prop = wantedProperties[propkey];
result[prop] = article[prop];
}
writeStream.write(JSON.stringify(result));
return;
}

Loading…
Cancel
Save