I need to save this object in a database, but first I have to send it to the backend.
Recorder {config: Object, recording: false, callbacks: Object, context: AudioContext, node: ScriptProcessorNode…}
However, after using JSON.stringify(recorder)
The resulting output is as follows:
{"config":{"bufferLen":4096,"numChannels":2,"mimeType":"audio/wav"},"recording":false,"callbacks":{"getBuffer":[],"exportWAV":[]},"context":{},"node":{},"worker":{}}
Why is the context part missing?
I discovered that this is because 'context' is a nested object. How can I use JSON.stringify
on a nested object?