I am using amp.html and JSON to build an unordered list of links.
Budget: €8 – €30 EUR
I am using amp.html and JSON to build an unordered list of links. Essentially, it's a navigation menu. The name of each link and its URL are both values within the JSON file: name and html_url respectively.
I have already written the code that creates the basic list (see below), but I now need to make each list item a hyperlink that corresponds to its own particular URL value.
Can you please advise how I pull the URL value for each item in the JSON file and apply it to my code so that each list item becomes a hyperlink that loads the appropriate URL? Thanks in advance for feedback.
The source code used is as follows :
https://amp.dev/documentation/examples/interactivity-dynamic-content/linked_dropdowns/
AUSTRALIA --------> <a href="brisbane.html">Brisbane</a>
AUSTRALIA --------> <a href="melbourne.html">Melbourne</a>
AUSTRALIA --------> <a href="sydney.html">Sydney</a>
I have already written the code that creates the basic list (see below), but I now need to make each list item a hyperlink that corresponds to its own particular URL value.
Can you please advise how I pull the URL value for each item in the JSON file and apply it to my code so that each list item becomes a hyperlink that loads the appropriate URL? Thanks in advance for feedback.
The source code used is as follows :
https://amp.dev/documentation/examples/interactivity-dynamic-content/linked_dropdowns/
AUSTRALIA --------> <a href="brisbane.html">Brisbane</a>
AUSTRALIA --------> <a href="melbourne.html">Melbourne</a>
AUSTRALIA --------> <a href="sydney.html">Sydney</a>
Related categories:
JSON