I have a cosmo db container structured something like this:
RIDER
{
id:
Fullname:
RaceEntry:
[ {RaceID
RaceDate
RaceResult}
]
}
Some of my data has square brackets [] around the RaceEntry field and some do not i.e. where there is only once instance of a RaceEntry. My problem is the documents that don't have the square brackets fail to be picked up when a run a join query - e.g. "SELECT c.id , t.RaceDate FROM c JOIN t IN c.RaceEntry ".
Is there a way to restructure the query to cater for the 'bad' records, or alternatively how could I find all records where the square brackets are missing and correct them?