Don't like ads? PRO users don't see any ads ;-)
Guest

Untitled

By: a guest on Aug 11th, 2012  |  syntax: None  |  size: 0.74 KB  |  hits: 10  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. Parsing JSON: brackets in response
  2. NSString *response = [request responseString];
  3.     responseDict = [response JSONValue];
  4.  
  5. videoTitleArray = [responseDict valueForKeyPath:@"feed.entry.title.$t"];
  6.        
  7. videoAuthorArray = [responseDict valueForKeyPath:@"feed.entry.author.name.$t"];
  8.     NSLog(@"%@", videoAuthorArray);
  9.        
  10. (
  11.     author 1
  12. ),
  13.     (
  14.     author 2
  15. ),
  16.     (
  17.     author 3
  18. ),
  19.     (
  20.     author 4
  21. ),
  22.        
  23. "author":[{"name":{"$t":"mls"},"uri":{"$t":"http://gdata.youtube.com/feeds/api/users/mls"},"yt$userId":{"$t":"SZbXT5TLLW_i-5W8FZpFsg"}}]
  24.        
  25. "author":[
  26.   {
  27.     "name": {
  28.       "$t":"mls"
  29.     },
  30.     "uri": {
  31.       "$t":"http://gdata.youtube.com/feeds/api/users/mls"
  32.     },
  33.     "yt$userId":{
  34.       "$t":"SZbXT5TLLW_i-5W8FZpFsg"
  35.     }
  36.   }
  37. ],