I am using a plain JavaScript object. I have to create an exact copy of the object to make changes:
var gRoll = {a:"pankaj",b:
{
a:"A",b:"c"
}}
var copy = gRoll;
copy.a = "Karma";
This is making change in the parent object. Please give me solution to create copy of the object without referring to the old one. Same like prototype design pattern in OOPS.