I have two arrays idxListResponse and _index, both of which have the same structure.
Each of these arrays contains several elements with different properties, one of which is a child array called indexdata p>
Each element of this array has a number of properties, one of which is another array, called a data field. This has several key value pair properties.
So, essentially, I have a hierarchy of 3 separate arrays.
I want to get the first level of the hierarchy + all the elements of the 2nd level, where the elements of the 3rd level do not match, i.e. exclude only those elements from the 2nd level, where the elements of the third level correspond.
I tried to approach this in several different ways, but so far I'm not going anywhere, anyone can help.
FYI - this is my last attempt
var q = idxListResponse.Index.Where(a => a.IndexData.All(b => b.DataField.All(c => _index.Index.Where(z => z.IndexData.All(y => y.DataField.Contains(c.name)) ) ) ) );
source share