I need to read a very big location history file and extract some data and write to a file as JSON data. How can i do that.
The following code doesn’t generate any output.
Edit:
I expect to string output in the file, because it’s piped into fileOutputStream

This is my solution the my problem. JSONStream parses the input file and spits JSON objects. The es.through(transformer) takes the JSON object and writes it to the file as string. To make file output file to be importable in ES6, ‘export default locationHistory’ is added.
https://gist.github.com/tuncatunc/35e5449905159928e718d82c06bc66da