title: deleting just the parent node and not the child node in json object
body: <pre><code>{"0":
       {"id":"1",
        "Name":"A1",
        "parent_id":"0"},
   "1":
      {"id":"2",
       "Name":"A2",
       "parent_id":"0",
       "0":
           {"id":"3",
            "Name":"A3",
            "parent_id":"2",
            "0": 
                {"id":"4",
                 "Name":"A4",
                 "parent_id":"3"}}}}
  </code></pre>
  
  <p>This is populated from a database table. I want to delete only node id 2(A2). Id 3's parent id should automatically become id 1. That is A2's immediate child becomes the child of it's parent along with its children. I cannot use splice or remove on this as I am using js with QML. Any suggestions? I am currently able to delete the entire node along with its children(a2,a3,a4) by finding the node that has to be deleted and assigning it to null.I am having a difficulty in deleting just the selected node and not its children.</p>