I want to take pa
but empty MG
props.
Parent pa = new Parent()
{
MC = new Child[]
{
new Child() {M1 = 1},
new Child() {M1 = 2},
new Child() {M1 = 3},
},
MG = new GrandChild[]
{
new GrandChild() {M2 = "1"},
new GrandChild() {M2 = ""},
new GrandChild() {M2 = ""},
new GrandChild() {M2 = "4"},
},
MP = "just string prop",
};
I know this is not true but wanna take my object like this way:
var vv = pa.MG.Where(_p=>_p.M2!="").Select(_k=>_k.**parent**)