Im currently trying to get the response array in my console that comes from my Dropbox API. And I want to get that array so that I will display it in my JStree.. I try the console.log(fulltree.entries) to show the array and this is the result console.log I want to get that array in my console to show in my jstree
$(function() {
var fullTree;
var url = 'https://api.dropboxapi.com/1/delta';
var access_token = 'My ACCESS TOKEN IN DROPBOXAPI';
$.ajax({
url: url,
data: fullTree,
method: "POST",
dataType: "json",
beforeSend: function(request) {
request.setRequestHeader('Content-Type', 'application/json');
request.setRequestHeader("Authorization", 'Bearer ' + access_token);
},
success: function(fullTree) {
$('#container').jstree({
'core': {
"data": fullTree.entries,
"check_callback": true,
},
"plugins": ["themes", "contextmenu", "ui","icon"]
});
console.log(fullTree.entries);
},
error: function(xhr, ajaxOptions, thrownError) {
console.log(xhr.status);
console.log(thrownError);
}
});
});