title: How do I get the value's of name & url from a nsdictionary object?
body: <p>I am using touch JSON which worked out pretty well for me. I was able to take an array, put it in a dictionary, serialize it via touchJSON and send it out via http.</p>
  
  <p>Now on the return end, I received the data, and put it into a dictionary (I'm using trends.json from twitter as an example JSON). </p>
  
  <p>If I try to get the value for trends from the dictionary object, I get this:</p>
  
  <pre><code>2010-08-02 00:23:31.069 rateMyTaxi[30610:207] ANSWER: (
    {
      name = "Fried Chicken Flu";
      url = "http://search.twitter.com/search?q=Fried+Chicken+Flu";
    },
    {
      name = "Lisa Simpson";
      url = "http://search.twitter.com/search?q=Lisa+Simpson";
    },
    {
      name = "#breakuplines";
      url = "http://search.twitter.com/search?q=%23breakuplines";
    },
    {
      name = "#thingsuglypeopledo";
      url = "http://search.twitter.com/search?q=%23thingsuglypeopledo";
    },
    {
      name = "Inception";
      url = "http://search.twitter.com/search?q=Inception";
    },
    {
      name = "#sharkweek";
      url = "http://search.twitter.com/search?q=%23sharkweek";
    },
    {
      name = "JailbreakMe";
      url = "http://search.twitter.com/search?q=JailbreakMe";
    },
    {
      name = "Kourtney";
      url = "http://search.twitter.com/search?q=Kourtney";
    },
    {
      name = "Shark";
      url = "http://search.twitter.com/search?q=Shark";
    },
    {
      name = "Boondocks";
      url = "http://search.twitter.com/search?q=Boondocks";
    }
  )
  </code></pre>
  
  <p>If I try to get the value for name or URL, I get nothing which is frustrating. That is the data I will need. You can tell it is in a dictionary format because it is formatted and it is reading properly sort of for trends. I'm pretty sure I'm missing something, so please let me know which direction to follow.</p>
  
  <p>Here is the code:</p>
  
  <pre><code>// this is all touch JSON magic. responseString has the full contents of trends.json
  
   NSString *response = [request responseString];
   NSLog(@"response value is:%@",response);
  
   NSString *jsonString = response;
   NSData *jsonData = [jsonString dataUsingEncoding:NSUTF32BigEndianStringEncoding];
   NSError *error = nil;
   NSDictionary *dictionary = [[CJSONDeserializer deserializer] deserializeAsDictionary:jsonData error:&amp;error];
  //end of touchJSON.  It is in a dictionary now.
  
   NSLog(@"dictionary:%@, error %@", dictionary, error); //http://cl.ly/adb6c6a974c3e70fb51c
  
   NSString *twitterTrends = (NSString *) [dictionary objectForKey:@"trends"];
   NSLog(@"ANSWER:%@",twitterTrends); //http://cl.ly/fe270fe7f05a0ea8d478
  </code></pre>