I am creating a service which should read an array of arrays using AngularJS with $resource. I see my service is returning a nice JSON String like :
[["Year-Month","e","i"],["2015-Mar",133.442,124.379],["2015-Apr",163.057,126.804],["2015-May",170.029,112.344],["2015-Jun",170.939,125.220],["2015-Jul",177.132,133.504],["2015-Aug",176.723,117.596]]
Unfortunately when I read it with:
var tResource = $resource("/t/CH/6X", {}, { get: {method: 'GET', cache: true,
isArray: true}});
tResource.get({}, function(data){
...
});
It is simply an array of arrays.
Unfortunately the data received is not the array that was received. It is I guess, a Resource object containing all rows in my matrix. Each row have the key representing the row number and having as value another Resource object, which contains each column stored again as key/value, where the key is the column number.
In other words I would like to receive as data in my success function simply the 2 dimensional arrays sent by the server.
How can I do that?