how to set userdata with JSON string

I encounter some problems with loadJSONObject() method in how to construct the JSON string to include user data. As I know, the user data is perfectly supported by loadXML() via a xml tag, ‘’, but I don’t know how to do that with loadJSONObject() and JSON string. Can someone help me out? Thank you.

JSON reflect structure of XML object, so it will be

   {id:1,text:“1111”, userdata: [{ name:“some_name”, content:“some_value”}] }


I’m having problems with getuserdata + json. I’ve send next json:


That prints perfectly, but when I raise
Object_Organigrama_tree.getUserData(id,“tel”) it returns “undefined”.
Is there any bug like in this post? … 20userdata
(Is the same as I’m aiming but for dhtmlxgrid)


Change userdata syntax to the�� � � � � “userdata”:[{“name”:“tel”,“content”:“ddd”}]with such way of data declaration it will work correctly.�