I have an output that contains system output information from a remote server, and at the very end of the output, it contains a JSON object. Like this:
output:
...
-Verification-
-Test1: PASS
-Test2: PASS
...
...
Result: PASS
...
#JSON Object below
{"path": "/my/path/file.log", "name": "Roger", "year": 2018}
The output would only contain one set of {} and that is the JSON object I want to parse. So we don't have to worry about grabbing wrong information
I would like my flask app to parse this output to only return the JSON object (everything in the {} including the {}) and filter all the text above it. How can I do this?
regex?