I am trying to parse JSON. Example below
[ { "id": "(error)", "raw": "Expected an assignment or function call and instead saw an expression.", "code": "W030", "evidence": "v", "line": 1, "character": 1, "scope": "(main)", "reason": "Expected an assignment or function call and instead saw an expression." }, { "id": "(error)", "raw": "Missing semicolon.", "code": "W033", "evidence": "v", "line": 1, "character": 2, "scope": "(main)", "reason": "Missing semicolon." } ]
I just need to print something like the following:
- Reason 1: A function assignment or call was expected, and an expression instead.
- Reason 2: The semicolon is missing.
I have a DEMO . How can I just analyze only the properties / values ββof the βcauseβ and how many times does this happen?
source share