title: Firebase Android: how do I access params nested in data via RemoteMessage?
body: <p>via this shape:</p>
  
  <pre><code>{
    "to": "000",
    "priority": "high",
    "data": {
      "title": "A Title",
      "message": "A Message",
      "link": {
        "url": "http://www.espn.com",
        "text": "ESPN",
      }
    }
  }
  </code></pre>
  
  <p>how can I access "url" and "text"?</p>
  
  <pre><code>String messageLink = remoteMessage.getData().get("link");
  </code></pre>
  
  <p>gets me:</p>
  
  <pre><code>{"text":"ESPN","url":"http://www.espn.com"}
  </code></pre>
  
  <p>but how do I drill deeper?</p>
  
  <pre><code>remoteMessage.getData().get("link").get("text");
  </code></pre>
  
  <p>doesnt quite work...  I have also attempted JSONObject:</p>
  
  <pre><code>JSONObject json = new JSONObject(remoteMessage.getData());    
  JSONObject link = json.getJSONObject("link");
  </code></pre>
  
  <p>but this gives me try catch errors...</p>
  
  <p>Any help and direction as always is greatly appreciated!</p>