title: Extract nested key from string data structure
body: <p>I am using mailgun for sending email. It has api for add “Unsubscribe me” feature. I am using it in my rails app.</p>
  
  <p>Using this command, i get list of all unsubscribed users i.e. entries in unsubscribes table of mailgun.</p>
  
  <pre><code> RestClient.get "https://api:key-3ax6xnjp29jd6fds4gc373sgvjxteol0"  "@api.mailgun.net/v2/samples.mailgun.org/unsubscribes"
  </code></pre>
  
  <p>I am storing its output in @unsubscriber. So my controller has:</p>
  
  <pre><code>  @unsubscribers = RestClient.get "https://api:key-3ax6xnjp29jd6fds4gc373sgvjxteol0"  "@api.mailgun.net/v2/samples.mailgun.org/unsubscribes"
  </code></pre>
  
  <p>When i display the output in view, &lt;%= @unsubscribers %> i get string:</p>
  
  <pre><code>{
    "total_count": 1,
    "items": [{
      "created_at": "Sun, 11 Aug 2013 08:07:22 GMT",
      "tag": "*",
      "id": "sdfsdfw12423535456",
      "address": "xyz@abc.com"
    }]
  }
  </code></pre>
  
  <p>As I want to delete unsubscribed emails from my database, I want only emails in @unsubscribers. But it contains whole string.</p>
  
  <p>I am not getting how to extract email from above string so that i can have list of emails in @unsubscribers and i can delete them from my app.</p>
  
  <p>Can anybody help me?</p>