Group by multiple columns not working

Aug 25, 2013 at 6:10 AM
Edited Aug 25, 2013 at 6:12 AM
The group by multiple columns (more than 2) is not working, It gives you repeated results. The issue:
[{ a0: "Apartment", a1: "Unfurnished", a2: "1", a3: "ARS", a4: 17760, a5: 16190, a6: 14625 },   
 { a0: "Apartment", a1: "Unfurnished", a2: "1", a3: "EUR", a4: 2500, a5: 2275, a6: 2055 }
If I do the following (list is the variable with the previous array):

        var result = list.GroupBy("{a0: $.a0, a1: $.a1, a2: $.a2 }").Select("{Key:$.Key(),Value:$.ToArray()}").ToArray();

It gives me results with the first tree values repeated (a0, a1, a2) several times (An SQL group by doesnt gives you a repeated value). In the key value pair result, the value only has 1 value in the array (it should have at least 2) and the key combination is repeated.