title: How to get path of children when parent is selected in jstree
body: <p>I'm trying to get the path of the parent and children nodes when the parent is selected. To get the path of the node selected I did the following: </p>
  
  <pre><code> $("#jstree_demo_div").jstree({
      "core" : {
         "data" : {
            "type" : "POST",
            "url" : "myurl.php",
            "data" : function (node) {
                    return { "id" : node.id };
                }
         },
         "dataType" : "json",
      },
      "plugins" : [ "wholerow", "checkbox", "types" ]
   })
   .on("changed.jstree", function (e, data) {
      var path = $("#jstree_demo_div").jstree(true).get_path(data.node,"/");
      console.log ("path = " + path + "\n");
   });""
  </code></pre>
  
  <p>But I don't know how to get the path the children's parent. </p>
  
  <p>I tried to get the id's of children's parent and then apply the <code>split()</code>function to get the id's and then apply the <code>get_path()</code> but this is not working, because it said that <code>split</code> is not a function.</p>
  
  <pre><code>var test = data.node.children;
  var spt_tst = test.split(',');
  alert("node = " + spt_tst[0]);
  </code></pre>
  
  <p>What am I doing wrong?</p>
  
  <p>**** EDIT ****</p>
  
  <p>My tree is like in the image:
  <img src="https://i.stack.imgur.com/8p9SO.png" alt="enter image description here"></p>
  
  <p>What I want to do is: select the folder <strong>images</strong> and the get the path of all the content, for example, I want to get the path of the things that are inside <strong>.xvpics</strong> folder and the others too. Because I will have to send these paths to an .txt file.</p>