title: Index on JSON Array Field
body: <p>I have a JSON field that is an array of elements composed of oid, instance and value. Most of my queries will be on a combination of oid and instance.</p>
  
  <p>What is the syntax for creating such an index if the combination of oid and instance is unique?</p>
  
  <pre><code>[
   { 'oid' : '1.3.1', 'instance' : '0', 'value' : '0' }, 
   { 'oid' : '1.3.1', 'instance' : '2', 'value' : '9' },
   { 'oid' : '1.3.6.1', 'instance' : '0', 'value' : '1' },
   { 'oid' : '1.3.6.9', 'instance' : '0', 'value' : '1' }
  ]
  </code></pre>
  
  <p>Thanks,
  Avi</p>