You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm trying to get the value of the data property from the response object path of the parser method, but it always returns null, I had to do a fix using JSON.stringfy to get what I wanted, can I Help with the reason for this behavior?
const uploadFiles = async function (event) {
var r = await parser.parse(event);
if (r.files.length > 0) {
for (var i in r.files) {
********************* THE PROBLEM HERE
// THIS aways return "NULL", why??
var data = r.files[i].content.data;
console.log(data); // AWAYS null
********************* THE FIX HERE
// FIX To get de "data" property
var objSerialized = JSON.stringify(r.files[i]);
var data2 = JSON.parse(objSerialized);
console.log(data2); // ITS ok
}
}
};
The text was updated successfully, but these errors were encountered:
Hi,
I'm trying to get the value of the
data
property from the response object path of theparser
method, but it always returnsnull
, I had to do a fix usingJSON.stringfy
to get what I wanted, can I Help with the reason for this behavior?The text was updated successfully, but these errors were encountered: