I have a column that is using the JSON type. I would like to perform a query to select all distinct records for a particular field in the JSON string: I.e. given these three documents
{
id: 1,
s: "foo"
},
{
id:2,
s: "bar"
},
{
id:3,
s: "foo"
},
the query must check the “s” key for distinct values and return the documents with id 1 and 2.