문제

I get values as shown below.

How can I get particular values of ABC, NI, NTI, SRNI and TTT?

(
 {
     ABC = A;
     NI = 5;
     NTI = I;
     SRNI = 12R00109;
     TTT = Pqr;
 }
)
도움이 되었습니까?

해결책

NSString *Str=[yourDic valueForKey:@"ABC"];

다른 팁

NSDictionary *dict = @{@"ABC": @"A",
                       @"NI" : @5,
                       @"NTI": @"I"};

NSLog(@"ABC =  %@, NI = %@, NTI = %@" , dict[@"ABC"], dict[@"NI"], dict[@"NTI"]);

Now you have an Array and dictionary so you can retrieve like this

NSString *strABC = [[yourArray objectatindex:0] valueforkey:@"ABC"];

NSString *strNI = [[yourArray objectatindex:0] valueforkey:@"NI"];
라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top