I have a set of documents in a mongo collection that have a schema like so:
{
"itemIds":{
"12341234-1234-1234-1234-123412341234": true,
"23452345-2345-2354-2345-234523452354": false,
"34563456-3456-3456-3456-345634563456": true
}
}
Because of our move to azure cognitive search, I need to use a mongo projection to get the data to look like this:
{
"itemIds": ["12341234-1234-1234-1234-123412341234",
"34563456-3456-3456-3456-345634563456"]
}
The properties with a false value should be excluded, and the properties with a true value should be converted to array values.