title: linqjs group by with a sum
body: <p>This might seems like an easy question but I'm struggling with the linqjs syntax.</p>
  
  <p>Given the following basic JSON:</p>
  
  <pre><code>{
          "DateEvent": "2013-04-23 14:00:00Z",
          "DateRecord": "2013-04-23 14:00:00Z",
          "Amount": -9500,
          "Type": {
              "Description": "Capital"
          },
          "Currency": {
              "ID": "USD",
          }
  }
  </code></pre>
  
  <p>Using linqjs how can I return the total for each currency?</p>
  
  <pre><code>Enumerable.From(data)
      .GroupBy("{ currency: $.Currency.ID }", null, 
          function (key, g) {
              var result = {
                      currency: key.currency,
                      total: g.Sum($.Amount)
                  }});
  </code></pre>
  
  <p>The code above doesn't work.</p>