I have a file with multiple json objects, single object can span multiple lines. How do I iterate over all objects in a file using nodejs.
Background: I am monitoring a service using REST api, and writing it stats to a file continuously over a period of time. I want to process that file and plot graph of various parameters.
Example
{
"items" : 534,
"latency" : 23,
"errors": 4
}
{
"items" : 493,
"latency" : 22,
"errors": 3
}
....