到目前为止,我已将一个对象放入JSON文件中,以便在我的JavaScript代码中使用。像这样:
"disc":[
{"key":"0001","film":{"title":"12 Monkeys","director":"Terry Gilliam",...}},
...
}
]
现在我想在同一个文件中包含五个对象。我该如何构建文件?
答案 0 :(得分:1)
[{"disc":[ {"key":"0001","film":{"title":"12 Monkeys","director":"Terry Gilliam"}} ]},{"disc":[ {"key":"0001","film":{"title":"12 Monkeys","director":"Terry Gilliam"}} ]},{"disc":[ {"key":"0001","film":{"title":"12 Monkeys","director":"Terry Gilliam"}} ]},{"disc":[ {"key":"0001","film":{"title":"12 Monkeys","director":"Terry Gilliam"}} ]},{"disc":[ {"key":"0001","film":{"title":"12 Monkeys","director":"Terry Gilliam"}} ]}]