title: how to create a json array in swift
body: <p>I am trying to send a POST http request with the following in Swift and struggling to find out how to write the 'params' part below into Swift. </p>
  
  <pre><code>{ 
  "method": "getContentCount", 
  "params": [
     { "uri": "storage:memoryCard1", 
     "target": "all" }
    ]
  }
  </code></pre>
  
  <p>As for the 'param', I think its json array with just one item in it and tried </p>
  
  <p><code>a) params: ["scheme":"storage"]</code>
  // I assume this is a json object and doesn't match with the above 'params' format  and it doesn't work </p>
  
  <p><code>b) params: [ ["uri": "storage:memoryCard1", "target": "all" ]]</code> I assume this is the right one to match with the 'params' but this doesn't work either. </p>
  
  <p>I have search for an answer on Stackoverflow to little avail. If you know the answer or any reference to the answer, please leave a comment. </p>
  
  <p>I appreciate your time for reading this. </p>