The structure of each data is as follows:
<code>{ id: 2, year: "2016", month: "09", day: "19", time_name: "下午班", time_range: "14:00-17:00" },</code>
It needs to be converted into the following linkage effect based on the year, month and day data inside. I haven’t thought of a better loop to make them into a data structure like province and city linkage, because after all, there are 3 dimensions. Is there any better solution?
The structure of each data is as follows:
<code>{ id: 2, year: "2016", month: "09", day: "19", time_name: "下午班", time_range: "14:00-17:00" },</code>
It needs to be converted into the following linkage effect based on the year, month and day data inside. I haven’t thought of a better loop to make them into a data structure like province and city linkage, because after all, there are 3 dimensions. Is there any better solution?
It is too troublesome to use code to filter items one by one. It is recommended to use web sql. You can search for related articles
or you can read this html5 local storage