title: Passing Arrays in array JSON from Android to rails server
body: <p>This should be the JSON output:</p>
  
  <pre><code>{
  "ph_immunizations_attributes": [
         {"immunization_id": 1},
         {"immunization_id": 2}
  ]
  }
  </code></pre>
  
  <p>How will i translate it in my Android codes to post in my rails server</p>
  
  <p>And here's the code:</p>
  
  <pre><code>List&lt;NameValuePair&gt; immunizatioValuePairs = new ArrayList();
  JSONObject jObj = new JSONObject();
  JSONObject main = new JSONObject();
  JSONArray jA = new JSONArray();
  jObj.put("immmunization_id", 1);
  
  jA.put(jObj);
  main.put("ph_immunizations_attributes", jA);
  
  
  immunizatioValuePairs.add(new BasicNameValuePair("ph_immunizations_attributes",             main.toString()));
  httppost.setEntity(new UrlEncodedFormEntity(immunizatioValuePairs));
  </code></pre>