Sorry for the stupid question but for the life of me I cant get this right and a bit of a noob. Im getting a frontend javascript error :
TypeError: Cannot read property 'data' of undefined
My code :
var getApiPipe = services.pipecall(_this.getPackage).success(function (data) {
if (data.response[0].data.length > 0) {
_this.buyerObjectResponse = data.response[0].data;
} else {
_this.noDataBuyer = true;
}
_thisRoot.loading = false;
});
The JSON return which is coming back from server :
{
"status":true,
"response":[
{
"data":[
{
"ID":1,
"auctionid":4,
"sessionname":"Session 1",
"created":"2017-09-25 10:13:57"
}
]
}
]
}
Please help :(
undefinedand what you're actually looking for.datamay be a Stringdatatype.