This gist is to support the answer to this Stackoverflow 61825263 question
run it as the following code
node log-parser.js logfile.log
What you'll see on your screen is this:
[
{ Name: 'nom1', Cities: [ 'city1', 'city2' ] },
{ Name: 'nom2', Cities: [ 'city4', 'city5' ] },
{ Name: 'nom3', Cities: [ 'city3', 'city6' ] },
{ Name: 'nom4', Cities: [ 'city7', 'city8' ] },
{ Name: 'nom5', Cities: [ 'city9', 'cityA' ] },
{ Name: 'nom6', Cities: [ 'cityB', 'cityC' ] }
]