Skip to content

Tag: loops

Showing dates on HTML on option select

I am working on an HTML file that has a drop-down list of months. When I select a month, I want the function to show the dates of the month on the page in this format: 1st of December 2020 2nd of December 2020 . . . 31st of December 2020 Below is my html: I cannot get the function

How to loop through complex JSON tree data?

Problem: I am given JSON tree data that looks something like below: The objective is to take the json object and its id and find matching object with id. let’s just assume its been parsed so it’s treated like an object. Basically, I don’t know how deeply each set of id and name is nested. So…