Wednesday, July 1, 2015

HOW TO REMOVE CHILD OBJECT PROPERTY FROM JSON OBJECT ??

JSON OBJECT DATA

var userdata = {
  "parent": {
    "name": "rose",
    "child1": {
             "name" : '"tiny"
     }
   }
}

var userJsonObjt =  JSON.parse(userdata);

delete userJsonObjt["parent"].child1.name;

this will remove the child name from the userdata

No comments:

Post a Comment

Scrum and Scrum master

Scrum  Scrum is a framework which helps a team to work together.  It is like a rugby team (the scrum name comes from rugby game). Scrum enco...