in this structure i want to remove that particular column from output (:i “”) than is it possible???
like..input is same
{
:aa {:a "a_val",:b "b_val"},
:qq {:abc
{
:x1 {:x "abc",:u "ee"},
:x2 {:y "abc",:i "ee"},
:x3 {:x "abc",:i ""}
}
},
:ww {:xyz {
:y1 {:x "abc",:u "ee"},
:y2 {:y "abc",:i ""},
:y3 {:x "abc",:i "ee"}
}
}
}
but ineed output of it like…
{
:aa {:a "a_val",:b "b_val"},
:qq {:abc
{
:x1 {:x "abc",:u "ee"},
:x2 {:y "abc",:i "ee"}
}
},
:ww {:xyz {
:y1 {:x "abc",:u "ee"},
:y3 {:x "abc",:i "ee"}
}
}
}
Due to the (rather horrible) schema that’s not doable in a generic way. Your schema does now allow querying on fields in embedded documents because you’d need to know the field names of the higher level documents. In other words you cannot have a query “unset all ‘x’ where ‘i’ is empty” because your schema is not appropriate for it.
You will have to redesign your schema to allow for what you need to do. As a rule start by writing down what you need to do with your data, then design a schema that allows the most common usecase most efficiently.