I have tried to creates a new object b
from object a
using Object.create
var a ={};
var b = Object.create( a );
a.n = 1;
b.m = 2;
When I iterate two object through for .. in ..
its showing correct values . but JSON.stringify not printing correct string .
JSON.stringify( b )
It supposed to print like {"n":1,"m":2}
. but it print like {"m":2}
only . Any suggestions why?
I have added it in jsfiddle . link of jsfiddle http://jsfiddle.net/V3Nxs/