i’m trying to implement a nested $ifNull
structure to handle various potential data fields.
module_data: {
$ifNull: [
“$renewal”,
{
$ifNull: [
“$type_of_alert”,
{
$ifNull: [
“$department_type”,
{
$ifNull: [
“$costomer_type”,
{
$ifNull: [
“$company_size”,
{
$ifNull: [
“$naigp_code”,
{
$ifNull: [
“$naisc_code”,
{
$ifNull: [
“$relationship_type”,
{
$ifNull: [
“$drill_type”,
{
$ifNull: [
“$office”,
{
$ifNull: [
“$customer”,
{
$ifNull: [
“$facility”,
{
$ifNull: [
“$linked_facility”,
{
$ifNull: [
“$superadmin”,
{
$ifNull: [
“$department”,
{
$ifNull: [
“$linked_department”,
{
$ifNull: [
“$customer_document_type”,
{
$ifNull: [
“$superadmin_role”,
{
$ifNull: [
“$camera_info”,
{
$ifNull: [
“$document”,
{
$ifNull: [
“$customer_payment”,
“”
]
}
]
}
]
}
]
}
]
}
]
}
]
}
]
}
]
}
]
}
]
}
]
}
]
}
]
}
]
}
]
}
]
}
]
}
]
}
]
}
]
}
but last one nested operation not working