私はこのjsonリンクを持っています Json_link
(17:00) と (Amberg) と (Aubstadt) の値を取得する方法。事前に感謝します。
私はこのjsonリンクを持っています Json_link
(17:00) と (Amberg) と (Aubstadt) の値を取得する方法。事前に感謝します。
プロジェクトに JSON ライブラリを追加し、解析ファイルにコードを配置します
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"]);