我正在使用 Dojo 1.6 来呈现一个简单的 DatGrid。我面临的唯一问题类似于dojo 1.6 DataGrid 无法显示列表? 这里的解决方案以及来自这里的参考http://dojotoolkit.org/documentation/tutorials/1.6/store_driven_grid/确实有效,但 JSON 结构仍然存在一个问题。以下是工作和非工作示例。我正在以格式获取 JSON,其中所有内容都包含在 items 数组中。我如何使它工作?
工作的 json 格式
[{
"bolist": ["CHM", "CVO", "PMO"],
"title": "How do I do",
"painpoints": ["this", "that", "manay more"],
"solution": "wondeful"
}, {
"bolist": ["DGM", "EXE", "CLI"],
"title": "There we go",
"painpoints": ["Front", "back", "many other places"],
"solution": "under review"
}]
不工作的 json 格式(我正在以这种格式获取我的 json)
{"items":[{
"bolist": ["CHM", "CVO", "PMO"],
"title": "How do I do",
"painpoints": ["this", "that", "manay more"],
"solution": "wondeful"
}, {
"bolist": ["DGM", "EXE", "CLI"],
"title": "There we go",
"painpoints": ["Front", "back", "many other places"],
"solution": "under review"
}]}