title: Get Boolean Value from Reddit .JSON Parse
body: <p>The file can be viewed <a href="http://www1.datafilehost.com/d/25dae11d" rel="nofollow">here</a>. I am parsing for the attribute "likes" but I am getting <code>&lt;null&gt;</code> even when I have liked the post. I am 100% sure my modhash is valid, and when I view the file I can see that true is appearing for posts I have upvoted. </p>
  
  <p>My Code: </p>
  
  <pre><code>NSData *responseData = [NSData dataWithContentsOfURL:[NSURL URLWithString:@"http://reddit.com/.json"]];
  
  NSDictionary *json = [NSJSONSerialization
                        JSONObjectWithData:responseData
  
                        options:kNilOptions
                        error:&amp;error];
  
  NSArray *objects = [[json objectForKey:@"data"] objectForKey:@"children"];
  
  
  
  postArr = [[NSMutableArray alloc] init];
  
  int likesCnt = 0;
  for (NSDictionary *object in objects) {
      NSObject *likeObj = [[object objectForKey:@"data"] objectForKey:@"likes"] ;
      NSObject *data = [object objectForKey:@"data"];  
  
      int voteDirection = 0;
      if(![likeObj isKindOfClass:[NSNull class]] &amp;&amp; [[data valueForKey:@"likes"] boolValue])
          voteDirection = 1;
      else if(![likeObj isKindOfClass:[NSNull class]] &amp;&amp; ![[data valueForKey:@"likes"] boolValue])
          voteDirection = -1;
  
  
      //Reddit Post in an NSObject Class for organizing info for specific posts.
      RedditPost *post = postArr[likesCnt];
      post.currentVote = voteDirection;
      postArr[likesCnt] = post;
      NSLog(@"Title:(%@) Vote:(%d)",post.title,voteDirection);
      likesCnt++;
  }
  </code></pre>
  
  <p>New file: <a href="http://www1.datafilehost.com/d/25dae11d" rel="nofollow">http://www1.datafilehost.com/d/25dae11d</a></p>