forEach
,因为我可以轻松地使用它为每个条目向我的html网站添加代码。我的问题:我有这样的json数据:
{
"support": {
"url": "https://this-is-the-url.end",
"author": "Name of the Author"
},
"invite": {
"url": "https://an-other-url.end",
"author": "Name of the Author"
},
.
.
.
}
而且我不知道如何拆分它,所以我可以使用
Object.forEach(json => { var author = json.author var url = json.url *add code to html code* })
我已经在Stackoverflow上进行了搜索,但是我找不到任何东西。有人可以帮我吗?