I have coded an url-shortener using Node.JS and saving in json-data. Now I'm coding an Web-Dashboard for my Team to manage the urls. I like to use forEach
, because I can easily use it to add code to my html site for each entry. My problem:
I have json data just like this:
{
"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"
},
.
.
.
}
and I dont know how to split it so I can use
Object.forEach(json => {
var author = json.author
var url = json.url
*add code to html code*
})
I already searched on Stackoverflow but i could not find something. Can someone help me?