title: iOS: write data to json file programatically
body: <p>My json file look like this:</p>
  
  <pre><code>{
    "images": [
    "straight up kick.png",
    "women kick.png",
    "Taekwondo Kanji vertical.png",
    "face kick3.png",
    "flexibility.png",
    "Punch.png",
    "hook kick.png",
    "front kick 2.png"
   ]
  }
  </code></pre>
  
  <p>i am reading above json programmatically like below:</p>
  
  <pre><code>NSString *path = [[NSBundle mainBundle] pathForResource:@"generated" ofType:@"json"];
  NSData *data = [NSData dataWithContentsOfFile:path];
  NSDictionary *dict = [NSJSONSerialization JSONObjectWithData:data options:kNilOptions error:nil];
  
  NSMutableArray * jsonimages = [dict objectForKey:@"images"];
  NSLog(@"images %@", jsonimages);
  </code></pre>
  
  <p>i want to add more items to array named as jsonimages by writing to json file programmatically.
  Json file name is generated.json.</p>
  
  <p>Any help would be appreciated.</p>