I'm trying to make a response that sends a big data of JSON
. So JSON.stringify()
seems not to work because let's say I have an object:
const student = {
somevar: 15,
anothervar: 21,
setofdata: Map(15) {
1 => {
somevar: 31,
anothervar: 45
}
2... 15
}
}
So what happens when I convert it to string will be like this: {'somevar': '15', 'anothervar': '21', 'setofdata': {}}
Now when I parse it back, it seems like he doesn't know all about inside the set of data. What module should I download to achieve this? I tried LJSON but it didn't work out.