I have a json string as the following:
{"hasErrors":"true", "exceptions":"..........", "hasRight":"false"}
I need the result from hasRight
and hasErrors
so that I can do the following comparison operation:
if ["$RESULT" == "true"]; then
exit 0
elif ["$ERR" == "true"]; then
exit 400
else
exit 404
fi
Note that the position of the hasError and hasRight keys may not remain the same. e.g
{"exceptions":"..........", "hasRight":"false", "hasErrors":"true"}