vakata/jstree — Issue #137: Accessing Metadata 
Author: tempelton
Created: 2011-11-29 11:43:57+00:00
State: open

HI,
I have a tree with some metadata, implemented like this:
```
"metadata":{
"filters":{"groupOp":"OR","rules":[{"field":"RemoteAddress","op":"eq","data":"a1sd"}, ......
"url":"/stringifiedURL/jsonService"
},
```
this works perfectly and I can access the url and filters data from my bind events like this:
```
.bind("select_node.jstree",function(e,data){
console.log(jQuery.data(data.rslt.obj[0],"url"))
```

Now I need to have an edit Button somewhere on my page and make the metadata editable.
So I lookup the selected tree node like this:
```
selected=$('ul#demo1').jstree('get_selected');
rel=$(selected).attr("rel"); //this works fine!
console.log($.data($(selected),"url")) //this Does not work ;(
```

With firebug and debugging, I can't see any data attached to the node.
I think I need something like this, but probably I got something wrong here ;)

console.log(jQuery.data($(selected).rslt.obj[0],"url")) <-- ok this cannot work, but shows what I am trying to do ;)

can you please point me towards a solution?

Thanks alot!
Great Project!!!