mardi 4 août 2015

Convert JSON to list of arrays

How can I convert my JSON to list of arrays My JSON is Serie :
[{"Value":10,"ValuePourcent":2},{"Value":20,"ValuePourcent":3},{"Value":51,"ValuePourcent":1}]

I Would like this : [[10,2],[20,3],[:51,1]]

var linq = Enumerable.From(rows);

var Serie = linq
                .GroupBy("$.Year", null,
                    function(key, g) {
                        var result = {
                            Value: g.Sum("$.Car"),
                            ValuePourcent: g.Sum("$.CarPourcent")/Total*100,
                        };
                        return result;
                    })
                .ToJSON()

Aucun commentaire:

Enregistrer un commentaire