I'm converting json object to an array. The data I get is like below. I have try google but not found the answer. How to solve this issue from data below
[{"january":"0.00","february":"0.00","mac":"1271.00","april":"5.00","may":"0.00","june":"0.00","july":"0.00","august":"0.00","september":"0.00","october":"0.00","november":"0.00","december":"0.00"}]
into this
$scope.data = [
[0.00, 0.00, 1271.00, 5.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00]
];
in file.html
<div class="card">
<div class="card-header">
<i class="icon-graph icon-bg"></i>Bar Chart
</div>
<canvas id="bar" class="chart chart-bar" chart-data="graph" chart-labels="labels"></canvas>
</div>
in file.js
$http.get(commonData.apiURL + 'dashboard/countDataGraph.php')
.success(function (data) {
$scope.graph = data;
console.log(JSON.stringify(data));
})
.error(function (data, status, headers, config) {
$scope.errorMessage = "Couldn't load the list of Orders, error # " + status;
console.log("error");
});