I have this large response from an external API call, and I want to get only a specific message from the string.
Here is the response:
"There was a problem sending the email through the SendGrid API.\n\nHere is the
response:\n\n\"{\\\"errors\\\":[{\\\"message\\\":\\\"The subject is required. You can get around this
requirement if you use a template with a subject defined or if every personalization has a subject defined.\\\"
I want to extract the message
value from the above string. message will contain any value depending on the error. In this case it is this line:
"The subject is required. You can get around this
requirement if you use a template with a subject defined or if every personalization has a subject defined.\\\"
Is there any regex that can help?
Any help will be much appreciated
Thanks.