undefined in JSON.stringify(x)... Well, I didn't expect that.
x = {a:1, b:2, c:3}
x.b = undefined
console.log(JSON.stringify(x))
> {"a":1,"c":3}
//No more "b" !!!
//But "b" is still on the object...
Object.keys(x)
> ["a", "b", "c"]
console.log(x)
> {a: 1, b: undefined, c: 3}
Comments
Post a Comment