Javascript JsTree网格未定义JSON中的值

Javascript JsTree网格未定义JSON中的值,javascript,jstree,Javascript,Jstree,JsTree网格插件对我来说无法正常工作。我通过JSON文件响应AJAX请求来获取节点数据(包括网格列的数据) JS代码段: .jstree({ 'core' : { 'data' : { 'url' : '/cms/ajax/ajax_json_tree.php?table=subpages_tree&operation=get_node', 'data' : function (node) {

JsTree网格插件对我来说无法正常工作。我通过JSON文件响应AJAX请求来获取节点数据(包括网格列的数据)

JS代码段:

    .jstree({
    'core' : {
        'data' : {
            'url' : '/cms/ajax/ajax_json_tree.php?table=subpages_tree&operation=get_node',
            'data' : function (node) {
                return {
                    'id' : node.id,
                    'seo_title' : node.seo_title
                };
            },
            'dataType' : 'json'
        },
        'check_callback' : true,
        'themes' : {
            'responsive' : false
        }
    },
    'plugins' : ['state','dnd','contextmenu','grid'],
    grid: {
        columns: [
            {width: 300, header: "Name"},
            {width: 100, header: "SEO", value: "seo_title"}
        ]
    },
    'force_text' : true

})
JSON响应来自:

/cms/ajax/ajax\u json\u tree.php?table=subpages\u tree&operation=get\u node

[
   {
      "id":255,
      "text":"NEWS",
      "children":true,
      "seo_title":"news"
   },
   {
      "id":256,
      "text":"DEVWEBMAIL",
      "children":false,
      "seo_title":"devwebmail"
   }
]
不知何故,node.seo_标题始终未定义。你能解释一下为什么会这样吗?问题似乎在于jstree中的网格插件集成


版本:我正在使用jstree 3.3.3.0和jstreegrid 3.4.2。

最后,我已经让它工作了。问题出在JSON数据文件中。它必须具有稍微不同的数据结构:

[
   {
      "id":255,
      "text":"NEWS",
      "children":true,
      "data" {
          "seo_title":"news"
      }
   },
   {
      "id":256,
      "text":"DEVWEBMAIL",
      "children":false,
      "data" {
          "seo_title":"devwebmail"
      }
   }
]