I've got a list of universities that I have generated from a json file, and I want to add a hyperlink for each university in the list generated so that I can navigate to each of their respective university pages.
HTML
<ul data-bind="foreach: university">
<li data-bind="text: university"></li>
</ul>
I have been using knockout.js to get the json data to appear in the html and I was wondering whether there was a way to do this without hardcoding each link into the html?
JSON file
{
"universities": [
{
"university": "Cambridge"
},
{
"university": "Oxford"
},
{
"university": "UEA"
}
]
}
Thanks for any help :)