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.
What is the syntax for creating such an index if the combination of oid and instance is unique?
[
{ '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' }
]
Thanks, Avi