Skip to content

How to display the REST json response as tree ? #31

Description

@AnsarSamad

while looking into the demo and the official page i couldn't understand how it is possible to dispaly a REST service response as json tree.

could you please share with me that how can i do to display json tree of REST Service response.
i tried the below code , but nothing is displayed in the page

var myjson = { any: { json: { value: 1 } } };
var opt = { 
    change: function(data) { /* called on every change */ },
    propertyclick: function(path) { /* called when a property is clicked with the JS path to that property */ }
};
/* opt.propertyElement = '<textarea>'; */ // element of the property field, <input> is default
/* opt.valueElement = '<textarea>'; */  // element of the value field, <input> is default
$('#mydiv').jsonEditor(myjson, opt);

please let me know that what is "#mydiv" , is that the div where the output tree is displayed ?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions