JSINQ (Linq for JavaScript library) sub-queries (how-to)
- by Tom Tresansky
I'm using this library: jsinq.
I want to create a new object using subqueries. For example, in .NET LINQ, I could do something like this:
from a in Attendances
where a.SomeProperty = SomeValue
select new {
.Property1 = a.Property1,
.Property2 = a.Property2,
.Property3 = (from p in People
where p.SomeProperty = a.Property3
select p)
}
such that I get a list of ALL people where Property3 value matches the attendance's Property3 value in EACH object returned in the list.
I didn't see any sample of this in the docs or on the playground. Made a couple tries of it and didn't have any luck.
Anybody know if this is possible and how to?