Let's say I have the following data,
data: {
variations: [{
steps: [
{ Name: "Crawl", Status: "Complete" },
{ Name: "Walk", Status: "InProgress" }
]
},{
steps: [
{ Name: "Crawl", Status: "Complete" },
{ Name: "Walk", Status: "Complete" },
{ Name: "Run", Status: "NotStarted" }
]
}]
}
How would I arrive at this set of data using linq.js? The resulting set of data is the unique steps across all variations. Notice, the duplicate Crawl is not in the result.
[
{ Name: "Crawl", Status: "Complete" },
{ Name: "Walk", Status: "InProgress" },
{ Name: "Walk", Status: "Complete" },
{ Name: "Run", Status: "NotStarted" }
]
I have tried many combinations of Select and SelectMany, but I'm having no luck.