tags:

views:

101

answers:

1

hi, i am accumulating data from NSMutableDictionary to NSMutabledata like

    NSMutableData *data = [receivedData objectForKey:@"tag1"];

and also

    data  = [receivedData objectForKey:@"tag2"];

after this one , how can i get data for @"tag2" only from NSMutableData?

 NSMutableData tag2Data = [Data forKey:@"tag2"]; 

is not working?

A: 

I'm unsure exactly what you are trying to do here, but it doesn't look like you are using the proper class. If you check the class reference from Apple there is a link to a great code example of getting a string out of an NSMutableData object, but the only way to access the data inside it is using getBytes.

sw