Hello!
Any advice on how to convert dates from this format:
{
“2022-05-23”: {
“1000”: 10,
“1200”: 10,
“1400”: 10
},
“2022-05-24”: {
“1000”: 10,
“1200”: 10,
“1400”: 10
}
}
to a list of dates that I can use to match with a list of service items based on the service items’ date/time so that I can update the item availability of each service item having the specific date/time?
For example:
-
I use an API to periodically check the availability of items for each date and receive a JSON with the above example.
-
I then convert that JSON data into a list of dates in the proper bubble date format: “date”:“quantity”
“05/23/22 10:00 am”:“1”
“05/23/22 12:00 PM”":“4”
“05/23/22 02:00 PM”":“6”
“05/24/22 10:00 am”":“9”
“05/24/22 12:00 PM”":“8”
“05/24/22 02:00 PM”":“12” -
Then I use that list of dates to do a search for a service item having the same date/time and update the item availability count for each service item having that same date/time:
i.e.
Service Item for 05/23/22 10:00 am had 3 items but after the update only has 1 item remaining.
Service Item for 05/24/22 02:00 PM had 15 items but after the update only has 12 items remaining.
I found the ISO8601 Duration Format Converter plugin but unfortunately it does not fit the format that I have to use due to the API formatting.
Thanks!