Saturday 27 May 2017

Remove text from a mixed JSON file

I'm working on Node.js script and I have a mixed .wat file which contains text and JSON objects, I want to remove the text and keep JSON ojbects Input file:

Some text 1
Some text 2
{"key1": "value1", "key2": "value2"}
Some text 3
Some text 4
{"key1": "value3", "key2": "value4"}

This is how I'm expecting the Output file:

{"key1": "value1", "key2": "value2"}
{"key1": "value3", "key2": "value4"}



via melhirech

No comments:

Post a Comment