解析する有効な JSON は次のとおりです。
[{"name":"kkkk","empid":"55628","address":"mumbai","mobile":"9525878558"},{"name":"xtreme","empid":"20","address":"stripes","mobile":"9999597"},{"name":"xtreme","empid":"20","address":"stripes","mobile":"9699597"},{"name":"xtreme","empid":"20","address":"stripes","mobile":"9699597"},{"name":"xtreme","empid":"20","address":"stripes","mobile":"9699597"},{"name":"xtreme","empid":"20","address":"stripes","mobile":"9689597"},{"name":"xtreme","empid":"20","address":"stripes","mobile":"9699597"},{"name":"xtreme","empid":"20","address":"stripes","mobile":"9689597"},{"name":"xtreme","empid":"20","address":"stripes","mobile":"9699597"},{"name":"vx","empid":"96","address":"addre","mobile":"9999596"},{"name":"vxx","empid":"96","address":"addre","mobile":"96899"},{"name":"vx","empid":"96","address":"addre","mobile":"9689596"}]
これを解析した後、そのプロパティを従業員オブジェクトに設定したいと思います。動作していない次のコードを試しました:
NSDictionary *dict=[parser objectWithString:firstParseData];
NSString *secondParseData=[dict objectForKey:@"name"];
NSLog(@"name=%@",secondParseData);
何が問題なのかわかりません。助けてください。