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

  • Home
  • SEARCH
  • 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 6143559
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T18:32:21+00:00 2026-05-23T18:32:21+00:00

I have a jstree tree that I’m trying to extract the structure of using

  • 0

I have a jstree tree that I’m trying to extract the structure of using get_json (in order to post it back to the server), but I don’t seem to be getting any tree info in the returned object.

The tree is setup and working properly in

$("#site-structure-container").jstree({plugins : ["themes", "json_data"]});

(excluded above is the json I’ve supplied (from the first demo here) to setup the tree) and I’m using

data = $("#site-structure-container").jstree("get_json", -1);
console.log(JSON.stringify(data));

to check whats extracted. This is what is shown in the log:

{"length":1,"0":{"jQuery16203561271743551655":3},"context":{"jQuery16203561271743551655":1},"selector":"#site-structure-container"}

Surely I should be getting the tree structure in here? What am I doing wrong?

UPDATE:

Have eventually tracked it down to jQuery version.. 1.6.2 (which I was using) doesn’t appear to work in the same way that 1.4 to 1.6.1 do. Changing to any 1.4 to 1.6.1 means I get the result I expected ie.:

[{"data":{"attr":{},"title":"A node","icon":"checkbox"},"attr":{"id"...

I don’t know exactly what is going wrong with 1.6.2+, but I’ve found it doesn’t make any difference whether I use .jstree("get_json") or .jstree("blahblah") or .jstree(), I always get the same unexpected output as above ({"length":1...).

  • 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-23T18:32:21+00:00Added an answer on May 23, 2026 at 6:32 pm

    Have eventually tracked it down to jQuery version.. 1.6.2 (which I was using) doesn’t appear to work in the same way that 1.4 to 1.6.1 do. Changing to any 1.4 to 1.6.1 means I get the result I expected ie.:

    [{"data":{"attr":{},"title":"A node","icon":"checkbox"},"attr":{"id"...

    I don’t know exactly what is going wrong with 1.6.2, but I’ve found it doesn’t make any difference whether I use .jstree("get_json") or .jstree("blahblah") or .jstree(), I always get the same unexpected output as above ({“length”:1…).

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

Sidebar

Related Questions

I am using jsTree to display a tree structure of hierarchical data within my
I'm using jsTree and I have 2 textboxes: <input type=text id=previous_tree_id value= /><hr />
I am using jstree to build a tree menu. When you select an item
I have two questions regarding jsTree: I am generating a jsTree using JSON with
I have a tree with DefaultMutableTreeNodes only. I want to write a TreeCellRenderer that
I've got a custom tree cell renderer that I'm using to render custom icons
In a tree built with jsTree, I have the text within the <a> tag
We are using jsTree for tree representation of the Files and folders. Files and
So I have a jstree that looks like this: Root -1 -2 --2.1 ---2.1.1
I'm working on my first app using JStree and I have it doing almost

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.