title: Update mongo array elements by index with c-driver
body: <p>To update elements of a mongo array, I was using syntax like:</p>
  
  <pre><code>{"$set":{"a.0":1238},{"a.1":402}}
  </code></pre>
  
  <p>Or, more accurately, I was using the C-driver function calls that I think are equivalent to that.  This seemed to work fine, but when I look at the object in MongoHub, I see:</p>
  
  <pre><code>a: {"0":1238,"1":402}
  </code></pre>
  
  <p>instead of:</p>
  
  <pre><code>a: [1238,402]
  </code></pre>
  
  <p>Does anyone know what is proper syntax to access array elements by index with C-driver?  What I am doing now serves my immediate purpose, but I am not sure if there are significant performance differences.  Also, I might later need to use operations that require true array. </p>