Currently, I am in the process of setting up an AJAX call with the intention of manipulating the response data.
Upon inspecting my browser's network console, this is the response I am seeing:
{
"message": "success",
"file": "dump.xml"
}
This snippet demonstrates what I aim to achieve:
onComplete: function onComplete(data) {
var vm = this;
console.log(data.file);
this.$set('upload', data);
this.$set('filename', file);
this.modal.show();
}
Despite receiving a response, when I output data
to console.log, this is what I see:
{"message":"success","file":"dump.xml"}
However, if I attempt the following:
console.log(data.file);
I am met with undefined. The question remains: why?