把json中的数据显示到表格中:
/*多个对象表现形式*/
var person =
[
{"id":0,"name":"ding","hobby":['打飞机','躺赚','跟宗哥装B']},
{"id":1,"name":"chang","hobby":['打飞机','躺赚','喝酒']},
{"id":2,"name":"jiang","hobby":['打飞机','躺赚','写代码']}
]
/*单个对象表现形式
var person = {
"id":1,
"name":"丁",
"hobby":['打飞机','躺赚','写代码']
}
*/
/*
var person = {
person:[
{"id":0,"name":"ding","hobby":['打飞机','躺赚','跟宗哥装B']},
{"id":1,"name":"chang","hobby":['打飞机','躺赚','喝酒']},
{"id":2,"name":"jiang","hobby":['打飞机','躺赚','写代码']}
]
}*/
/*
{}都是以键值对的形式存在的
*/
Document
全选
编号
姓名
爱好