Syntax to read that JSON object (custom Fields)

I am having that object. What should be the syntax to read the value of Type-de-Membre custom’s fields highlight in green:

{
  "_id": "a6f6fa04-72b4-4b02-846f-d6947bb46a99",
  "loginEmail": "hfjfk@rmkloi.ca",
  "status": "APPROVED",
  "contactId": "76da9cd8-1aef-44c8-b7c6-64f8c2801a73",
  "privacyStatus": "PUBLIC",
  "activityStatus": "ACTIVE",
  "_createdDate": "2021-04-14T16:56:31.000Z",
  "_updatedDate": "2021-04-14T17:49:54.909Z",
  "lastLoginDate": "2022-01-21T10:17:15.000Z",
  "contactDetails": {
    "firstName": "firdt",
    "lastName": "lasdt",
    "phones": [
      "123456789"
    ],
    "emails": [
      "email@mail.ca",
      "email2@yahoo.ca"
    ],
    "addresses": [
      {
        "_id": "99850de1-d336-4984-9d16-3203c029c323",
        "addressLine": "454564 kjkjhkjhh",
        "city": "rutyu",
        "postalCode": "H0h 0h0"
      }
    ],
    "company": "maison",
    "jobTitle": "retraité",
    "customFields": {
      "custom.type-de-membre": {
        "name": "typeDeMembre",
        "value": "Auxiliaire"
      },
      "custom.groupe": {
        "name": "groupe",
        "value": "Membre"
      }
    }
  },
  "profile": {
    "nickname": "ytrdf",
    "profilePhoto": {
      "_id": "1bf8c6_46caff50570748c8ab16fefe46377878%7Emv2.jpg",
      "url": "https://static.wixstatic.com/media/1bf8c6_46caff50570748c8ab16fefe46377878%7Emv2.jpg",
      "height": 0,
      "width": 0
    },
    "slug": "ytrdfv"
  }
}

Let’s say this is an object named member.
Then the first green highlight will be:

member.contactDetails.customFields["custom.type-de-membre"].value

and the second one will be:

member.contactDetails.customFields["custom.groupe"].value

[UPDATED]

Big Thanks you