title: Parsing nested JSON object in Android
body: <p>I'm trying to parse a JSON object, part of which looks like this:</p>
  
  <pre><code>{
  "offer":{
      "category":"Salon",
      "description":"Use this offer now to enjoy this great Salon at a 20% discount. ",
      "discount":"20",
      "expiration":"2011-04-08T02:30:00Z",
      "published":"2011-04-07T12:00:33Z",
      "rescinded_at":null,
      "title":"20% off at Jun Hair Salon",
      "valid_from":"2011-04-07T12:00:31Z",
      "valid_to":"2011-04-08T02:00:00Z",
      "id":"JUN_HAIR_1302177631",
      "business":{
          "name":"Jun Hair Salon",
          "phone":"2126192989",
          "address":{
              "address_1":"12 Mott St",
              "address_2":null,
              "city":"New York",
              "cross_streets":"Chatham Sq &amp;amp; Worth St",
              "state":"NY",
              "zip":"10013"
          }
      },
  </code></pre>
  
  <p>And so on....</p>
  
  <p>So far, I'm able to parse very simply, by doing this kinda thing:</p>
  
  <pre><code>JSONObject jObject = new JSONObject(content);
  JSONObject offerObject = jObject.getJSONObject("offer");
  String attributeId = offerObject.getString("category");
  System.out.println(attributeId);
  
  String attributeValue = offerObject.getString("description");
  System.out.println(attributeValue);
  
  String titleValue = offerObject.getString("title");
  System.out.println(titleValue);`
  </code></pre>
  
  <p>But when I try it for 'name:' it won't work. </p>
  
  <p>I've tried:</p>
  
  <pre><code>JSONObject businessObject = jObject.getJSONObject("business");
  String nameValue = businesObject.getString("name");
  System.out.println(nameValue);
  </code></pre>
  
  <p>When I try that, I get "JSONObject [business] not found."</p>
  
  <p>And when I try: </p>
  
  <pre><code>String nameValue = offerObject.getString("name");
  System.out.println(nameValue);`
  </code></pre>
  
  <p>I get, as expected, "JSONObject [name] not found".</p>
  
  <p>What am I doing wrong here? I'm missing something basic....</p>