I have the following json document on my couch db.
{
{
"_id": "someid|goes|here",
"collected": {
"tags": ["abc", "def", "ghi"]
}
},
{
"_id": "someid1|goes|here",
"collected": {
"tags": ["abc", "klm","pqr"]
},
},
{
"_id": "someid2|goes|here",
"collected": {
"tags": ["efg", "hij","klm"]
},
}
}
How can I get the records where collected.tags
contains abc
? What I have tried so far is
{
"selector": {
"collected.tags": {
"$regex": "abc"
}
}
}