Skip to content

Instantly share code, notes, and snippets.

@lewdev
Last active July 3, 2021 08:34
Show Gist options
  • Select an option

  • Save lewdev/53513207264899170cb93cdb592c1f29 to your computer and use it in GitHub Desktop.

Select an option

Save lewdev/53513207264899170cb93cdb592c1f29 to your computer and use it in GitHub Desktop.
<!doctype html><html contenteditable><head><meta charset="utf-8"><meta name="viewport" content="width=device-width,initial-scale=1"><title>Template</title>
<style>*{font-size: 1rem;font-family:Verdana;line-height:1.5;}body{margin:.5rem;}</style>
<body><script>//mongoexport --collection=events --db=reporting --out=events.json
window.onload = function() {
fetch('data.json').then(r => r.json()).then(rows => {
const arr = [];
rows.filter(r => true).map(row => {
arr.push(row.str);
});
document.body.innerHTML = `["${arr.join('","')}"]`;
});
};</script>
</body></html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment