How can i convert a NSData to NSArray?

Christina picture Christina · May 24, 2011 · Viewed 36.3k times · Source

Possible Duplicates:
How to convert NSArray to NSData?
Need to convert NSData to NSArray

HI, I have a NSData object named as "myNsData"(it is converted form of NSArray) and a NSarray named as "myNsArray. can any one provide me a code to convert a NSData to NSArray?

Answer

Simon Lee picture Simon Lee · May 24, 2011

See this post... Convert NSArray to NSData

The last comment deals with the reverse....

NSArray *array = [NSKeyedUnarchiver unarchiveObjectWithData:data]