Getting Specific Data

I’m using the collections api to get all items. it shows like this…

{
  "items": [
    {
      "start": "2022-02-16T00:00:00.000Z",
      "end": "2022-02-17T00:00:00.000Z",
      "_archived": false,
      "_draft": false,
      "title": "Test Event 2",
      "name": "Test 2 Event",
      "slug": "test-2-event",
      "updated-on": "2022-02-09T02:19:25.776Z",
      "updated-by": "Person_5848fcd6fc74517b7aeca9bb",
      "created-on": "2022-02-09T02:19:25.776Z",
      "created-by": "Person_5848fcd6fc74517b7aeca9bb",
      "published-on": "2022-02-09T02:19:42.232Z",
      "published-by": "Person_5848fcd6fc74517b7aeca9bb",
      "_cid": "620323d0dfdbf875346615d9",
      "_id": "620324add039920266ab1e0a"
    },
  ],
  "count": 2,
  "limit": 100,
  "offset": 0,
  "total": 2
}

BUT i need it to look more like this.

 [
    {
      "start": "2022-02-16T00:00:00.000Z",
      "end": "2022-02-17T00:00:00.000Z",
      "_archived": false,
      "_draft": false,
      "title": "Test Event 2",
      "name": "Test 2 Event",
      "slug": "test-2-event",
      "updated-on": "2022-02-09T02:19:25.776Z",
      "updated-by": "Person_5848fcd6fc74517b7aeca9bb",
      "created-on": "2022-02-09T02:19:25.776Z",
      "created-by": "Person_5848fcd6fc74517b7aeca9bb",
      "published-on": "2022-02-09T02:19:42.232Z",
      "published-by": "Person_5848fcd6fc74517b7aeca9bb",
      "_cid": "620323d0dfdbf875346615d9",
      "_id": "620324add039920266ab1e0a"
    },
  ],

I’ve looked all over google but i don’t know how to parse it in my javascript. Any help would be appreciated. thanks in advance


Here is my site Read-Only: LINK
(how to share your site Read-Only link)

Thanks In advance to anyone who saw this but I ended up solving the issue using simple dot notation.

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.