Created
May 3, 2013 16:31
-
-
Save vroy/5510758 to your computer and use it in GitHub Desktop.
Keys with an undefined value are not included in JSON.stringify? http://cl.ly/image/3c0U000Z2m20 I know that undefined is not the same as null, but I find it odd nonetheless.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
> var x = { foo: undefined } | |
undefined | |
> x | |
Object {foo: undefined} | |
> JSON.stringify(x) | |
"{}" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment