How to get "Subject" value from Gmail API response?

Viewed 703

Below is the sample response I get from Gmail API payload headers. How do I get the "Subject" value from the below array of objects.

I do not want to use response.get(index).getValue().toString(); as the index will change from message to message.

  [{
    "name": "From",
    "value": "Someone <someone@example.com>"
  },
  {
    "name": "To",
    "value": "xyz@example.com"
  },
  {
    "name": "Subject",
    "value": "This is the subject value"
  }]
0 Answers
Related