Parse complex JSON to CSV in Javascript node.js

I Have the following JSON object

{
 "analyticsMaterials": [
{
  "idAnalyticsMaterial": 1,
  "eventId": "a26a582a-b670-461a-8728-9272f47bc6b5",
  "eventIdElement": "null",
  "idRepository": "1",
  "typeElement": "stand",
  "userId": "6c25110d-4256-42e1-8205-b75ece274487",
  "createdAt": "2022-03-07T13:29:06.081Z"
}
],
"boothLogs": [
{
  "idBoothLog": 1,
  "eventId": "a26a582a-b670-461a-8728-9272f47bc6b5",
  "boothNumber": 2,
  "userId": "a26a582a-b670-461a-8728-9272f47bc6b5",
  "socketId": "hajajjjjjjhshahj",
  "createdAt": "2022-03-07T13:33:43.835Z",
  "endedAt": "2022-03-07T13:33:43.835Z"
}
],
"accessLogs": [
{
  "idAccess": 1,
  "eventId": "a26a582a-b670-461a-8728-9272f47bc6b5",
  "urlAccess": "localhost:3000/my-event",
  "craetedAt": "2022-03-04T11:59:26.843Z",
  "endedAt": "2022-03-04T11:59:32.056Z",
  "userId": "6c25110d-4256-42e1-8205-b75ece274487",
  "socketId": "Sv2VYLdMmW_XIjkyAAAB"
}
],
"accreditationsEvent": [
{
  "idAccreditationPage": 1,
  "userId": "6c25110d-4256-42e1-8205-b75ece274487",
  "ip": "78.899.990.00",
  "browser": "string",
  "eventId": "a26a582a-b670-461a-8728-9272f47bc6b5",
  "createdAt": "2022-03-05T14:23:21.640Z"
}
],
"analyticsEventPage": [
{
  "idAnalyticsEventPage": 1,
  "ip": "78.899.990.00",
  "cityIp": "Limerick",
  "browser": "Chrome",
  "eventId": "a26a582a-b670-461a-8728-9272f47bc6b5",
  "createdAt": "2022-03-04T11:34:47.773Z"
}
]
}

What I want to do is…
make an route where I can download this JSON object parsed to CSV.
I’m using Node.js and Express.

Or simply parse the object then I can handle the download in
the client as well