Just for example lets say i have a document in Cosmos document DB looking something like this:
{
"somename" : "myname"
"data": {
"meta": {
"versionId": "1",
"lastUpdated": "somedate",
"myStringArray": [
"OneString",
"AnotherString"
]
}
}
}
I want to write a Cosmos SQL query where i can search for partial matches in "myStringArray". I have been trying to use ARRAY_CONTAINS but cant get this to work since it seems that its only looking at given values in the array.
For example
ARRAY_CONTAINS(data.meta.myStringArray, 'OneString')
Works for full match.
The examples i see for searching for partial match is
ARRAY_CONTAINS(data.meta.myStringArray, {'TheValueIDontHave' : 'OneStrin'}, true)
This obviously wont work since i only have single strings in "myStringArray".
Im guessing that i might be able to combine STARTSWITH with ARRAY_CONTAINS, or maybe apply some JOINS but im stuck and cant sort it out.
Is there any way in CosmosDb where i can search for a partial match for any values in "myStringArray"?
Appreciate all help i can get. Thanks