I was able to remove “title” and “description” fields from the document using “objectToArray” and “$map” to filter.
I needed help merging the document now and filtering the empty sub-document.
{
"_id" : "63dadc6753bfc516421c5958",
"properties" : [
{
"k" : "abc:id",
"v" : [
{
},
{
"k" : "type",
"v" : "string"
},
{
}
]
},
{
"k" : "abc:authenticatedState",
"v" : [
{
},
{
"k" : "type",
"v" : "string"
},
{
"k" : "default",
"v" : "ambiguous"
},
{
"k" : "enum",
"v" : [
"ambiguous",
"authenticated",
"loggedOut"
]
}
]
},
{
"k" : "abc:primary",
"v" : [
{
},
{
"k" : "type",
"v" : "boolean"
},
{
"k" : "default",
"v" : false
},
{
}
]
}
]
}