title: How can I save an array using Parse?
body: <p>I am struggling to use Parse to save an array of data - or at least I am finding I can't verify that my data is being saved.</p>
  
  <p>I have a PFObject (journey) and I want to update it with my location (a string in the format: @"{lat, long}"). </p>
  
  <p>Eventually though I want to update and save my location every 10-30 seconds meaning I don't want to create a new object each time rather I want to add an array to the object and then update the array each time I have a new location. </p>
  
  <p>Currently my code looks like this:</p>
  
  <pre><code>- (IBAction)startJourneyButtonPressed:(id)sender {
  
      PFObject * journey = [PFObject objectWithClassName:@"Journey"];
      journey[@"company"] = _companyNameTextField.text;
      journey[@"destination"] = _destinationTextField.text;
  
      [journey saveInBackground];
  
      NSData * faceImageData = UIImagePNGRepresentation([_faceButton imageForState:UIControlStateNormal]);
      PFFile * faceImageFile = [PFFile fileWithName:@"faceImage.png" data:faceImageData];
  
      [faceImageFile saveInBackground];
  
      NSData * carImageData = UIImagePNGRepresentation([_carButton2 imageForState:UIControlStateNormal]);
      PFFile * carImageFile = [PFFile fileWithName:@"carImage.png" data:carImageData];
  
      [carImageFile saveInBackground];
  
      journey[@"faceImage"] = faceImageFile;
      journey[@"carImage"] = carImageFile;
  
      [journey saveInBackground];
  
      NSMutableArray * locationArray = [NSMutableArray new];
      [locationArray addObject:[self getCurrentLocationString]];
  
      journey[@"location"] = locationArray;
  
      [journey saveInBackground];
  }
  </code></pre>
  
  <p>The strings are saving fine and so are the images but the dataBase doesn't seem to be getting uploaded with the array.</p>
  
  <p>Here is a screenshot of my database:</p>
  
  <p><img src="https://i.stack.imgur.com/iYip0.png" alt="Parse DataBase"></p>
  
  <p>I am expecting to see a "location" heading but obviously it isn't appearing.</p>
  
  <p>Reading up on other forums it says that I have to have an object in JSON format for this to work but as I am only storing Strings and I am not receiving and JSON errors I don't think this is the issue.</p>
  
  <p>Any help would be very appreciated</p>