有人可以帮我构建一个循环来创建以下结构吗?值可以是任何东西。
var json = [
{
"adjacencies": [],
"data": {
"$color": "#83548B",
"$type": "circle",
"$dim": 10
},
"id": "graphnode0",
"name": "graphnode0"
}, {
"adjacencies": [],
"data": {
"$color": "#EBB056",
"$type": "triangle",
"$dim": 9
},
"id": "graphnode18",
"name": "graphnode18"
}, {
"adjacencies": [],
"data": {
"$color": "#70A35E",
"$type": "circle",
"$dim": 8
},
"id": "graphnode19",
"name": "graphnode19"
}, {
"adjacencies": [],
"data": {
"$color": "#C74243",
"$type": "star",
"$dim": 8
},
"id": "graphnode20",
"name": "graphnode20"
}
];