I am unable to configure a dojo data grid to remote server. The tutorial example I am following is:
http://dojotoolkit.org/documentation/tutorials/1.6/populating_datagrid/demo/datagrid-items.html
My code is written in a single jsp and is shown here:
<!DOCTYPE HTML>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Demo: dojox.grid.DataGrid Simple Structure</title>
<link rel="stylesheet" href="http://ajax.googleapis.com/ajax/libs/dojo/1.6/dojo/resources/dojo.css">
<link rel="stylesheet" href="http://ajax.googleapis.com/ajax/libs/dojo/1.6/dijit/themes/claro/claro.css">
<link rel="stylesheet" href="http://ajax.googleapis.com/ajax/libs/dojo/1.6/dojox/grid/resources/Grid.css">
<link rel="stylesheet" href="http://ajax.googleapis.com/ajax/libs/dojo/1.6/dojox/grid/resources/claroGrid.css">
<!-- load dojo and provide config via data attribute -->
<script src="http://ajax.googleapis.com/ajax/libs/dojo/1.6.0/dojo/dojo.xd.js"
data-dojo-config="isDebug: true,parseOnLoad: true">
</script>
<script>
dojo.require("dojox.grid.DataGrid");
dojo.require("dojo.data.ItemFileWriteStore");
var grid, store;
dojo.ready(function(){
store = new dojo.data.ItemFileWriteStore({
url: "MilestoneAjaxPopulateMsListEditor.json"
});
grid = new dojox.grid.DataGrid({
query: { id: "*" },
store: store,
structure: [
{ name: "First Name", field: "first", width: "25%" },
{ name: "Last Name", field: "last", width: "25%" }
]
},dojo.byId("grid"));
grid.startup();
});
</script>
</head>
<body class="claro">
<%@ include file="ui_init.jsp" %>
<h1>Demo: dojox.grid.DataGrid Simple Structure</h1>
<br/>
<div id="grid"></div>
<%@ include file="footer.jsp" %>
</body>
</html>
The Ajax request completes without any error (getting 200 OK response code). I am getting the following JSON from the remote server and is shown in firebug:
{"msdetails":[
{"first":"146", "last":"Concept Commit"}
, {"first":"147", "last":"Execution Commit"}
, {"first":"148", "last":"EFT Start"}
, {"first":"149", "last":"Throttle Pull Review"}
, {"first":"150", "last":"Throttle Pull"}
, {"first":"151", "last":"PSIRT Verification"}
, {"first":"152", "last":"Commit Test"}
, {"first":"153", "last":"FTS Complete"}
, {"first":"154", "last":"Image List"}
, {"first":"155", "last":"Upgrade Planner"}
, {"first":"156", "last":"Market Matrix"}
, {"first":"157", "last":"Reg Test Cmp"}
, {"first":"158", "last":"ISSU CM Creation"}
, {"first":"144", "last":"Build Start Time"}
, {"first":"159", "last":"ISSU CM Verification"}
, {"first":"160", "last":"OPUS"}
, {"first":"161", "last":"Docs Complete"}
, {"first":"162", "last":"TAC Readiness"}
, {"first":"145", "last":"CCO FCS"}
, {"first":"163", "last":"Field CCO FCS"}
, {"first":"164", "last":"HPC Date"}
, {"first":"165", "last":"EoLA"}
, {"first":"166", "last":"EoS"}
, {"first":"167", "last":"EoL/EoSM"}
, {"first":"168", "last":"EoVS Date"}
, {"first":"169", "last":"End of Support"}
]}
The error I get is:

Please help with any pointers on this error.
For ItemWriteStore to work properly, your array part of the json should be given key name as “items” and also, your json objects need to have key “id”, if not then, you also need to specify which key will act as id of json objects