title: iPhone how to post nsarry with json
body: <p>I have many json objects like:</p>
  
  <pre><code>{"id":"1","list":"456","name":"a"}, {"id":"2","list":"456","name":"b"}, {"id":"3","list":"456","name":"c"}
  </code></pre>
  
  <p>they stored in <code>NSDictionary</code> dic1, dic2, dic3, then I use <code>NSArray</code> store these dics,</p>
  
  <p>Here is my question, How can I post these dictionaries?</p>
  
  <p>I know post one json object, Here is my code</p>
  
  <pre><code>NSString *url = [SERVERPREFIX stringByAppendingString:urlString];
  DLog(@"url:%@", url);
  NSURL *reqURL = [NSURL URLWithString:url];
  NSData ***__jsonData**;
  // Be sure to properly escape your url string.
  NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:reqURL];
  [request setHTTPMethod:@"POST"];
  [request setHTTPBody: **__jsonData**];
  [request setValue:@"application/json" forHTTPHeaderField:@"Content-Type"];
  
  [request setValue:[NSString stringWithFormat:@"%d", (unsigned int)[__jsonData length]] forHTTPHeaderField:@"Content-Length"];
  
  
  [NSURLConnection sendAsynchronousRequest:request queue:[NSOperationQueue mainQueue] completionHandler:^(NSURLResponse *response, NSData *data, NSError *error) {
  </code></pre>
  
  <p>}</p>
  
  <p>So, the question is what the <strong>__jsonData</strong> should be?</p>