I have a JSON object, wanted to sort it, so I converted it to a JSON array
now after sorting json array i want to convert it to json object as it was at the beginning without losing the order of the elements

the JSON Array :

```
grille.weeks = [{
  "2020_1": {
    "calculated": "18.00",
    "ddeb": "2020-01-01",
    "dfin": "2020-01-05",
    "partiel": true,
    "planified": "",
    "productiveRealised": "",
    "realised": ""
  }
}, {
  "2020_2": {
    "calculated": "35.00",
    "ddeb": "2020-01-06",
    "dfin": "2020-01-12",
    "partiel": false,
    "planified": "",
    "productiveRealised": "",
    "realised": ""
  }
}]}

```

I want to convert it to this JSON Object :

```
grille.weeks = {
  "2020_1": {
    "calculated": "18.00",
    "ddeb": "2020-01-01",
    "dfin": "2020-01-05",
    "partiel": true,
    "planified": "",
    "productiveRealised": "",
    "realised": ""
  }
, 
  "2020_2": {
    "calculated": "35.00",
    "ddeb": "2020-01-06",
    "dfin": "2020-01-12",
    "partiel": false,
    "planified": "",
    "productiveRealised": "",
    "realised": ""
  }
}

```

What is the best way to do it?