Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7658645
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T13:13:44+00:00 2026-05-31T13:13:44+00:00

Using jsTree, I get data.rslt undefined when trying to read the data object. Here

  • 0

Using jsTree, I get data.rslt undefined when trying to read the data object.

Here is my jQuery, creating a tree, loading the JSON and it should output the data.rslt object to the console when loaded.

$(function () {
    $("#demo1").jstree({ 
        "plugins" : [ "themes","json_data","ui", "crrm" ],
        "json_data" : {
            "ajax" : {
                "url" : "categorytreejson.asp"
            }
        },
        "ui" : {
            "initially_select" : [ "root" ]
        }
    });

    $("#demo1").bind("loaded.jstree", function (e, data) {
        console.log(data.rslt)
    });
});

Here is the JSON data

{"data": "root", "attr": {"id": "root"}, "children": [{"data": "Photography", "attr": {"id": "Photography"}, "children": [{"data": "Lenses", "attr": {"id": "Lenses"}, "children": [{"data": "Telephoto", "attr": {"id": "Telephoto"}},{"data": "Macro", "attr": {"id": "Macro"}},{"data": "Other", "attr": {"id": "Other"}}]}]}]}

The resulting HTML

<li class="jstree-last jstree-open" id="root"><ins class="jstree-icon">&nbsp;</ins><a class="" href="#"><ins class="jstree-icon">&nbsp;</ins>root</a><ul style=""><li class="jstree-closed" id="Photography"><ins class="jstree-icon">&nbsp;</ins><a class="" href="#"><ins class="jstree-icon">&nbsp;</ins>Photography</a><ul><li class="jstree-last jstree-closed" id="Lenses"><ins class="jstree-icon">&nbsp;</ins><a href="#"><ins class="jstree-icon">&nbsp;</ins>Lenses</a><ul><li class="jstree-leaf" id="Telephoto"><ins class="jstree-icon">&nbsp;</ins><a href="#"><ins class="jstree-icon">&nbsp;</ins>Telephoto</a></li><li class="jstree-leaf" id="Macro"><ins class="jstree-icon">&nbsp;</ins><a href="#"><ins class="jstree-icon">&nbsp;</ins>Macro</a></li><li class="jstree-last jstree-leaf" id="Other"><ins class="jstree-icon">&nbsp;</ins><a href="#"><ins class="jstree-icon">&nbsp;</ins>Other</a></li></ul></li></ul></li></li></ul></li></ul></li>

And the data object in Firebug.

args: []
inst: Object { data={...}, get_settings=function(), _get_settings=function(), more...}
rlbk: false
rslt: undefined
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-31T13:13:45+00:00Added an answer on May 31, 2026 at 1:13 pm

    Some events will not populate the data.rslt object.
    As of the jsTree core documentation:

    data structure:

    { 
       "inst" : /* the actual tree instance */, 
       "args" : /* arguments passed to the function */, 
       "rslt" : /* any data the function passed to the event */, 
       "rlbk" : /* an optional rollback object - it is not always present */
    }
    

    In particular, the loaded.jstree event will have an empty data.rslt because no additional data was passed to the function.

    Other events like create.jstree or rename.jstree will have the data.rslt populated.

    I hope it’s more clear to you now 🙂

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am trying get tree view in the web page. I am using jstree
I am using jsTree for creating a documentation list index. I use JSON to
I'm trying to set up jsTree to dynamically accept JSON data from django. This
I have jsTree loading data from a JSON page and it displays correctly. I
I am using jsTree to display a tree structure of hierarchical data within my
I am loading XML flat tree in my jsTree using ajax, so the declaration
I'm using the jsTree jquery plugin which produces the links in the tree like
I'm using jsTree jQuery plugin for drawing a tree. When user clicks a node,
I am creating a node by using crrm as below $(#TreeDiv).jstree(create, $(#somenode), inside, {
I am using the jsTree jQuery plug-in with its Checkbox plug-in and using an

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.