I am parsing a JSON file with weekdays and times inside those weekdays. Problem is that whenever I parse them, it's a huge mix up. For example this is my json file:
{
"root1": {
"test": {
"monday": {
"08:00-12:20": {
"value1": "value2",
"value3": "value4"
}
},
"tuesday": {
"08:00-11:50": {
"value1": "value2",
"value3": "value4"
}
},
"wednesday": {
"08:00-11:50": {
"value1": "value2",
"value3": "value4"
}
},
"friday": {
"08:00-11:50": {
"value1": "value2",
"value3": "value4"
}
}
},
"test2": {
"saturday": {
"08:05-11:00": {
"value1": "value2",
"value3": "value4"
}
}
},
"test3": {
"monday": {
"12:45-15:10": {
"value1": "value2",
"value3": "value4"
}
},
"tuesday": {
"08:55-11:50": {
"value1": "value2",
"value3": "value4"
},
"15:30-17:55": {
"value1": "value2",
"value3": "value4"
}
},
"wednesday": {
"16:35-18:00": {
"value1": "value2",
"value3": "value4"
}
},
"thursday": {
"08:00-09:40": {
"value1": "value2",
"value3": "value4"
},
"10:00-12:25": {
"value1": "value2",
"value3": "value4"
}
},
"friday": {
"16:35-18:00": {
"value1": "value2",
"value3": "value4"
}
}
}
}
}
So you see the weekdays are in the correct order. But if I parsed them they're like this for example:
- thursday
- friday
- monday
- wednesday
- tuesday
How can I parse them into the right order?