I have the below static JSON file where list of error types and actions are provided (errors.json), and i have a log file which will have only 1 error type(logfile.log).
I wanted to iterate through the below JSON array and compare each error with the errors in the log file. If any of the below errors match with log file, then i need the action to be printed
[ {
"error": "timeout error",
"action": "do this"
},
{
"error": "file not found",
"action": "do that"
},
{
"error": "connectivity error",
"action": "foo"
},
{
"error": "EOF exception",
"action": "blaaa"
}
]