I feel like the answer to this should be simple but I am stumped. I have millions of documents with a few fields that are arrays, and have arrays with one element inside of it. Is there a way to simplify the array field? There is no consistent amount of single element arrays within the touchPointsDate array field.
This is how a field looks:
"touchPointsDate" : [
[
ISODate("2022-09-26T00:00:00.000+0000")
],
[
ISODate("2022-03-07T00:00:00.000+0000")
],
[
ISODate("2022-09-05T00:00:00.000+0000")
],
[
ISODate("2022-03-21T00:00:00.000+0000")
],
[
ISODate("2022-05-30T00:00:00.000+0000")
]
And I would like to simplify it to:
"touchPointsDate" : [
ISODate("2022-09-26T00:00:00.000+0000"),
ISODate("2022-03-07T00:00:00.000+0000"),
ISODate("2022-09-05T00:00:00.000+0000"),
ISODate("2022-03-21T00:00:00.000+0000"),
ISODate("2022-05-30T00:00:00.000+0000")
]