title: Dojo tree parent node
body: <p>I was wondering if anyone had a way to get the parent node of an item in a dojo tree? I have tried but it doesn't seem to work. </p>
  
  <p>I have tried a few different ways. </p>
  
  <p>First I tried this: </p>
  
  <pre><code>this.tree.get("path")[this.tree.get("path").length - 2];
  </code></pre>
  
  <p>Next I tried what I found on this site: <a href="http://dojo-toolkit.33424.n3.nabble.com/how-do-I-get-the-parent-node-of-a-dijit-Tree-node-td1788430.html" rel="nofollow">http://dojo-toolkit.33424.n3.nabble.com/how-do-I-get-the-parent-node-of-a-dijit-Tree-node-td1788430.html</a>\</p>
  
  <p>Neither one seems to work. I don't know why this is such a complicated thing when it is presumably a pretty common operation. If you could help me with this that would be awesome.</p>
  
  <p>Thanks</p>
  
  <p>EDIT: I guess what's throwing me off even more is that the method I tried first (the code sample provided) sometimes work. So this is really confusing me.</p>