The JSON spec does not allow undefined values, so when you try to stringify an object that contains an undefined value, the key will get removed: const person = { name: 'Peter', age: undefined }; JSON.stringify(person); // '{"name":"Peter"}' There ...
Markdown supported · ⌘↵ to post
No responses yet.