title: How to get exact data from NSUserDefaults in Objective C,iOS?
body: <p>I have NSMutableArray and I am trying to save that array in NSUserDefaults.Here is my code :</p>
  
  <p>to save :</p>
  
  <pre><code>NSUserDefaults *currentDefaults = [NSUserDefaults standardUserDefaults];
  [currentDefaults setObject:[NSKeyedArchiver archivedDataWithRootObject:userSession.transactionArray] forKey:@"TransId"];
  [currentDefaults synchronize];
  </code></pre>
  
  <p>to retrieve :</p>
  
  <pre><code>NSUserDefaults *currentDefault = [NSUserDefaults standardUserDefaults];
  NSData *dataRepresentingSavedArray = [currentDefault objectForKey:@"TransId"];
  NSMutableArray *oldSavedArray = [NSKeyedUnarchiver unarchiveObjectWithData:dataRepresentingSavedArray];
  userSession.transactionArray = [NSArray arrayWithArray:oldSavedArray];
  </code></pre>
  
  <p>But, I am getting my array in log,</p>
  
  <pre><code>"&lt;NSIndexPath: 0x160f8640&gt; {length = 2, path = 0 - 0}",
  "&lt;NSIndexPath: 0x1602bd70&gt; {length = 2, path = 0 - 1}",
  "&lt;NSIndexPath: 0x16026900&gt; {length = 2, path = 0 - 2}",
  "&lt;NSIndexPath: 0x14f01dd0&gt; {length = 2, path = 0 - 3}"
  </code></pre>
  
  <p>How to get actual data from this.Can anybody help me to get this value properly?
  Thanks in advance.</p>