2

I have a JSON-string in my google-script and it looks like this:

{ "email": "email@email.com", "url": "http://www.url.com" }

Now i want to send an email to the email that is specified in the string. How do i get the email element out of this JSON string?

Joost Kaal
  • 353
  • 1
  • 3
  • 13
  • Possible duplicate of [How to parse JSON response in Google App Script?](https://stackoverflow.com/questions/40552779/how-to-parse-json-response-in-google-app-script) – Riyafa Abdul Hameed Nov 30 '18 at 13:02

1 Answers1

1

Try the following:

var data = JSON.parse(yourJSONString);
var email = data.email
Riyafa Abdul Hameed
  • 7,417
  • 6
  • 40
  • 55