Hello, I’m kind of getting sloppy and I need your help. Normally I would figure this out but I have been working way too much…
• I have a JSON string from a webflow module see screenshot 1:
• I then convert this string to a JSON (not even sure if this is the right approach) see screenshot 2 :
What I want to achieve is to check for each json key (exemple: 2023-12-04 and 2023-12-08 etc) if those dates have already passed. If so I want to delete them. If not I want to keep them
So if you refer to screenshot 1. 2023-12-04 has passed. I want to delete all of this → “2023-12-04”: [“6h à 7h”, “23h à 0h”],
Thus, what needs to remain is this in this specific format: {“2023-12-08”: [“6h à 7h”, “23h à 0h”],“2023-12-09”: [“7h à 8h”, “9h à 10h”, “10h à 11h”], “2023-12-10”: [“9h à 10h”, “10h à 11h”], “2023-12-13”: [“0h à 1h”, “1h à 2h”, “2h à 3h”, “3h à 4h”, “4h à 5h”, “5h à 6h”, “6h à 7h”, “7h à 8h”, “8h à 9h”, “9h à 10h”, “10h à 11h”, “11h à 12h”, “12h à 13h”, “13h à 14h”, “14h à 15h”, “15h à 16h”, “16h à 17h”, “17h à 18h”, “18h à 19h”, “19h à 20h”, “20h à 21h”, “21h à 22h”, “22h à 23h”, “23h à 0h”]}
Thank you very much!