Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR CSHARP

Nested objects with linq expression

myBooks.SelectMany(b => b.Chapters
    .SelectMany(c => c.Pages
        .Select(p => b.Name + ", " + c.Name + ", " + p.Name)));
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #Nested #objects #linq #expression
ADD COMMENT
Topic
Name
2+3 =