So i have a json object which displays year, month and week of year:
{
"year": 2021,
"month": 8,
"week": 31,
},
{
"year": 2021,
"month": 8,
"week": 32,
}
My question is how can i iterate through the json object then convert the week of year into day of month where the day is the end of the week and then pass in the year, month and day of month into a DateTime object in flutter like this:
DateTime(2021,8,7)
DateTime(2021,8,14)