Answer the question
In order to leave comments, you need to log in
Node js: JSON.patse not outputting nested array, what to do?
The bottom line is that there is JSON : "payed":"" , you need to make it array, and iterate through all the arrays inside, breaking the resulting into variables.
with res.send(payed[0]); produces [ , so I convert to json once again
var obj = JSON.parse(req.params.data);
var payed = JSON.parse(obj.payed);
res.send(payed[0]);
var obj = JSON.parse(req.params.data);
var payed = JSON.parse(obj.payed);
res.send(payed[0][0]);
var obj = JSON.parse(req.params.data);
var payed = JSON.parse(obj.payed);
var ololo = JSON.parse(payed[0]);
res.send(ololo[0]);
Answer the question
In order to leave comments, you need to log in
var obj = JSON.parse(req.params.data);
var payed = JSON.parse(obj.payed);
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question