How could I parse the following JSON-Object to make it iterable via Javascript?

Viewed 7

I'm trying to iterate over the following JSON-Object of events, so that I can access the values of the "title", "description" and so forth. But since every Object has an unique date value and a nested id, I'm wondering how I could do that.

{
   "2022-09-22":{
      "tbZWsBriRLnSdn6JiFTw":{
         "id":"tbZWsBriRLnSdn6JiFTw",
         "title":"rser",
         "start":"04:00",
         "end":"05:00",
         "prevDate":"2022-09-22",
         "date":"2022-09-22",
         "description":"rsr",
         "color":"#6b293f",
         "events":[
         ]
      },
      "dbjHY0YI2vttfLIcGXOF":{
         "id":"dbjHY0YI2vttfLIcGXOF",
         "title":"rser",
         "start":"04:00",
         "end":"05:00",
         "prevDate":"2022-09-22",
         "date":"2022-09-22",
         "description":"rser",
         "color":"#63cbc2",
         "events":[
         ]
      }
   },
   "2022-09-20":{
      "iFfciWXRF9lfBh4SsYus":{
         "id":"iFfciWXRF9lfBh4SsYus",
         "title":"test",
         "start":"06:00",
         "end":"07:00",
         "prevDate":"2022-09-20",
         "date":"2022-09-20",
         "description":"ewffsfse",
         "color":"#d337e6",
         "events":[
         ]
      }

How could I bring the JSON into an iterable format like that?

{"id":"tbZWsBriRLnSdn6JiFTw",
"title":"rser",
"start":"04:00",
"end":"05:00",
"prevDate":"2022-09-22",
"date":"2022-09-22",
"description":"rser","
color":"#6b293f"}
0 Answers
Related