Example of how my code is
http://plnkr.co/edit/hMnKAzjbkQzHWjL5p6KX?p=previewangularjs
I get the data from the webService and I organize it this way.
var avaliacoes_descTipo = [];
var avaliacoes_quantidade = [];
angular.forEach(data, function(value, key) {
this.push(key + ': ' + value);
avaliacoes_descTipo[key] = value.descTipo;
avaliacoes_quantidade[key] = value.quantidade;
}, log_avaliacoes);
But I'm not able to put the values dynamic, put an array, I do not know, so to put it fixed, like the example below.
**{w: [
{V: avaliacoes_descTipo [1]},
{V: avaliacoes_quantidade [1]}
]}
{w: [
{V: avaliacoes_descTipo [2]},
{V: avaliacoes_quantidade [2]}
]}
]};**
I need help to make dynamic, foreach, any way I do not have to keep indexing it.?