I am trying to run aggregation query where trying to unwind the array which is nested under the key customFields.
Structure is like this
{
"note" : {
"customFields" : {
"externalAttendees" : [
{
"email" : "someemail@domain.com",
"epp" : null
},
{
"email" : "anotheremail@domain.com",
"epp" : null
}
]
}
}
}
customField is Map of type string, Object. When I am trying to unwind note.customFields.externalAttendees then getting error No property externalAttendees found for type Object! Traversed path: Activity.note.customFields.
On the other side if I unwind on the field which is an array of concrete object like List where User class have email and epp as instance variable then I am not getting any exception.
Is there any way to unwind on dynamic keys which are not part of bean but available in document.
I am using springMongoData db aggregation.