Here is the JSON data:
[
{
"id": 1,
"label": "saw",
"total": "100"
},
{
"id": 2,
"label": "saw1",
"total": "300"
},
{
"id": 3,
"label": "saw2",
"total": "400"
}
]
Below is my Typescript code snippet:
this.http.get('http://www/upnionic/chart.php')
.map(res => res.json()).subscribe(data => {
this.qwerty = data; this.qwerty.forEach(element => {
let product = element.total;
this.pieChartData = product;
console.log(product);
});
});
Any suggestions on how to display this JSON data in HTML using Ionic 2?
["100","300","400"]