[Syntax] LINQ Query Operations in UnityScript ( Js )

How do Linq expressions work in JS?

I’ve attempted this but the synax is C# so its obviously throwing some compiler exceptions

var participantResigned = from participant in match.participants
               where participant.matchOutcome == GKTurnBasedMatchOutcome.Quit
              select participant;

Could anyone give me an example of using there query methods in JS?

Thanks, Caius.

answer to my own question:

   var participantResigned = match.participants.Where(function(participant){ return participant.matchOutcome == GKTurnBasedMatchOutcome.Quit; })
     .Select(function(participant){ return participant; });

Untested but no compiler errors.