// Get Pipelines
const getPipelines = new Vue({
el: '#top-pipelines',
data: {
pipelines: []
},
mounted() {
axios({
method: 'post',
url: 'http:..xpto.../getpipelines',
data: {
orgId: "ORGIDXPTO",
pipelineId: "19",
dateFrom: "2017-11-01",
dateTo: "2017-11-31"
}
})
.then(function (response) {
console.log(response);
this.pipelines = response.json;
})
}
});
I also tried "this.pipelines = response.data;"
It's important to say that my answer JSON does not have a header line before the array of objects (see below).
[
{
"id_pipeline": "NOME_PIPELINE_XPTO",
"id_org": "ORGIDXPTO",
"name": "Nome Pipeline",
"active": "1"
},
{
"id_pipeline": "NOME_PIPELINE_XPTO",
"id_org": "ORGIDXPTO",
"name": "Nome Pipeline",
"active": "1"
},
{
"id_pipeline": "NOME_PIPELINE_XPTO",
"id_org": "ORGIDXPTO",
"name": "Nome Pipeline",
"active": "1"
},
{
"id_pipeline": "NOME_PIPELINE_XPTO",
"id_org": "ORGIDXPTO",
"name": "Nome Pipeline",
"active": "1"
},
{
"id_pipeline": "NOME_PIPELINE_XPTO",
"id_org": "ORGIDXPTO",
"name": "Nome Pipeline",
"active": "1"
}
]
Any tips?