anchor.diff:  				}, 250);
   			});
   
  -			var testData = [ {
  -				"id" : 1,
  -				"text" : "Cuentas",
  -				"children" : [ {
  -					"id" : 2,
  -					"text" : "Banco",
  -					"state" : "closed",
  -					"children" : [ {
  -						"id" : 3,
  -						"text" : "Santander"
  -					}, {
  -						"id" : 4,
  -						"text" : "Bancomer"
  -					}, {
  -						"id" : 5,
  -						"text" : "Banamex"
  -					} ]
  -				}, {
  -					"id" : 6,
  -					"text" : "Clientes",
  -					"children" : [ {
  -						"id" : 7,
  -						"text" : "Juan"
  -					}, {
  -						"id" : 8,
  -						"text" : "Jose"
  -					}, {
  -						"id" : 9,
  -						"text" : "Rosa"
  -					}, {
  -						"id" : 10,
  -						"text" : "Luis",
  -						"checked" : true
  -					} ]
  -				}, {
  -					"id" : 11,
  -					"text" : "Presentaciones"
  -				}, {
  -					"id" : 12,
  -					"text" : "Documentos"
  -				}, {
  -					"id" : 13,
  -					"text" : "Oficina"
  -				} ]
  -			}, ];
  -
  +			var json = (function () {
  +	   			 var json = [];
  +	   			 var old = [];
  +			    $.ajax({
  +			        'async': false,
  +			        'url': '/fiscoflex/cuentas',
  +			        'dataType': "json",
  +			        'success': function (data) {
  +			  		for(var i =0; i<data.length;i++){
  +			  			old = JSON.stringify(data); 
  +			  			old = old.replace("\"idCuentaContable\":", "\"id\":");
  +			  			old = old.replace("\"nombreCuenta\":", "\"text\":");		  					
  +			  			old = old.replace("\"cuentas\":", "\"children\":");
  +			  			json = JSON.parse(old);	
  +			  		}
  +			      }
  +			    });
  +			    return json;
  +			})();
  +			
   			$('#ajax').jstree(
   					{
   						"core" : {
   							"animation" : 0,
  -							"check_callback" : true,
   							"themes" : {
   								"stripes" : true
   							},
  -							'data' : testData
  -						//{url : "/fiscoflex/cuentas", type: "GET"}, spring cuenta controller
  +							'data' : json
  +						//{url : "/fiscoflex/cuentas", type: "GET",dataType :"json"},// spring cuenta controller							
   						},
   						"types" : {
   							"#" : {
  
positive.code: 				<!-- logo for regular state and mobile devices --> <span
  				class="logo-lg"><b>FiscoFlex</b></span>
  			</a>
  			<!-- Header Navbar: style can be found in header.less -->
  			<nav class="navbar navbar-static-top" role="navigation">
  				<!-- Sidebar toggle button-->
  				<a href="#" class="sidebar-toggle" data-toggle="offcanvas"
  
negative.code: 					});
  		});
  	</script>
  </body>
  </html>