0

i have this json link Json_link

how i can get the (17 : 00) and (Amberg) and (Aubstadt) values. and thanks in advance.

adellam
  • 811
  • 2
  • 9
  • 16
  • The JSON data mainly contains HTML data. And the values you're interested are in a in the HTML data. That'll be fun to extract... – Codo Jul 29 '12 at 15:45
  • 1
    As the comment already says - The data you want is in the html embedded in the JSON. You'll just have to get this and either use a regex or (preferably)an xml parser to get the data you want. – Abizern Jul 29 '12 at 15:47

1 Answers1

0

Add a JSON library into your project and put code at parsing file

NSArray* latestLoans = [(NSDictionary*)[responseString JSONValue] objectForKey:@"commands"];
[responseString release];

NSLog(@"%@",[[latestLoans objectAtIndex:0] objectForKey:@"name"]);
NSLog(@"%@",[[[latestLoans objectAtIndex:0] objectForKey:@"parameters"] objectForKey:@"container"]);
NSLog(@"%@",[[[latestLoans objectAtIndex:0] objectForKey:@"parameters"] objectForKey:@"content"]);
NSLog(@"%@",[[[latestLoans objectAtIndex:0] objectForKey:@"parameters"] objectForKey:@"position"]);



NSLog(@"%@",[[latestLoans objectAtIndex:1] objectForKey:@"name"]);
NSLog(@"%@",[[[[latestLoans objectAtIndex:1] objectForKey:@"parameters"] objectForKey:@"params"] objectForKey:@"date"]);
NSLog(@"%@",[[[[latestLoans objectAtIndex:1] objectForKey:@"parameters"] objectForKey:@"params"] objectForKey:@"display"]);
NSLog(@"%@",[[[[latestLoans objectAtIndex:1] objectForKey:@"parameters"] objectForKey:@"params"] objectForKey:@"timestamp"]);
Almo
  • 15,538
  • 13
  • 67
  • 95
iAndroid
  • 951
  • 7
  • 18