Q:

JsonObject.GetNamedObject() order

I'm trying to read out JSON using the using Windows.Data.Json. But for some reason GetNamedObject() returns my objects in a very silly way..
This is my JSON: 
{
   "schedule":{
      "schedule":{
         "Monday":{
            "1":{
               "class":"oo5",
               "classroom":"K53"
            },
            "2":{
               "class":"oo5",
               "classroom":"K53"
            }
         },
         "Tuesday":{
            "2":{
               "class":"biol6",
               "classroom":"S12"
            },
            "8":{
               "class":"loC",
               "classroom":"126"
            },
            "9":{
               "class":"loC",
               "classroom":"126"
            }
         },
         "Wednesday":{
            "3":{
               "class":"entlC",
               "classroom":"K51"
            }
         },
         "Thursday":{
            "3":{
               "class":"wisb3",
               "classroom":"S29"
            },
            "8":{
               "class":"inf8",
               "classroom":"S22"
            }
         },
         "Friday":{
            "1":{
               "name":"dhr. F. Lange de",
               "class":"schk1",
               "classroom":"S09"
            }
            "7":{
               "name":"mw. O. Beek ter",
               "class":"nat2",
               "classroom":"S10"
            }
         }
      }
   }
}

Note: this is a shortened version.
I'm trying to read out the days in the given order: "Monday, Tuesday, Wednesday, Thursday, Friday". 
I'm using the following C# code:
JsonObject JSON_OBJ_root;
JsonObject.TryParse(return_json, out JSON_OBJ_root);
JsonObject JSON_OBJ_schedule = JSON_OBJ_root.GetNamedObject("schedule");
JsonObject JSON_OBJ_days = JSON_OBJ_schedule.GetNamedObject("schedule"); //I think this is the problem

And when I use the debugger and lookup JSON_OBJ_days:
http://i.stack.imgur.com/WX5I5.png
Translation:
Woensdag = Wednesday
Vrijdag = Friday
Donderdag = Thursday
Dinsdag = Tuesday
Maandag = Monday

So, for some reason GetNamedObject() returns its objects in a random order. This is just brain bending! Can anyone tell me why this is and how I could solve this problem? 

A:

Object do not have an order in JSON. You should use an array where you want to save the order of the items.
Your JSON should be something like:
{
    "schedule": {
        "schedule": [
            {
                "name_day": "Monday",
                "schedule": [
                    {
                        "class": "oo5",
                        "classroom": "K53"
                    },
                    {
                        "class": "oo5",
                        "classroom": "K53"
                    }
                ]
            },
            {
                "name_day": "Tuesday",
                "schedule": [
                    {
                        "class": "oo5",
                        "classroom": "K53"
                    },
                    {
                        "class": "oo5",
                        "classroom": "K53"
                    }
                ]
            }
        ]
    }
}

Notice the [ instead of the {. "[" stands for an array where { is used when describing an object.

