简体   繁体   中英

I have created a Handsontable and want to render Json Data?

I have created a handsontable and getting a ajax request from local json file and when i tried to render both rows are showing same values,

[object, object] currently getting json response in this way a array of two objects.

when i render on Handsontable getting like this example:

name | phone ... 
test | 123123
test | 123123

I'm new to Javascript any help would be aapriciated.

在此处输入图片说明

JSON data :

var data.result = [ 
   {"Id": 10004, "PageName": "club"}, 
   {"Id": 10040, "PageName": "qaz"}, 
   {"Id": 10059, "PageName": "jjjjjjj"}
   ];

Get this data in jQuery:

$.each(data.result, function(i, item) {
    alert(data.result[i].PageName);
});

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM