parsing – How to parse Nested Json object in javascript

I write this post because I have tried many examples that I have also found on stackoverflow but in all the result they offer does not contain all the data that I have in the json file. It would be nice to have a full tree with all the information. The first thing I would like to get from the parse is to see all the values ​​of the “Name” key. This is my JSON object.

Properties: [
  {
    "expressID": 22497,
    "type": 1451395588,
    "GlobalId": {
      "type": 1,
      "value": "2idC0G3ezCdhA9YWjWe$$S"
    },
    "OwnerHistory": {
      "expressID": 41,
      "type": 1207048766,
      "OwningUser": {
        "expressID": 38,
        "type": 101040310,
        "ThePerson": {
          "expressID": 35,
          "type": 2077209135,
          "Identification": null,
          "FamilyName": {
            "type": 1,
            "value": ""
          },
          "GivenName": {
            "type": 1,
            "value": "CYPE"
          },
          "MiddleNames": null,
          "PrefixTitles": null,
          "SuffixTitles": null,
          "Roles": null,
          "Addresses": null
        },
        "TheOrganization": {
          "expressID": 37,
          "type": 4251960020,
          "Identification": null,
          "Name": {
            "type": 1,
            "value": ""
          },
          "Description": {
            "type": 1,
            "value": ""
          },
          "Roles": null,
          "Addresses": null
        },
        "Roles": null
      },
      "OwningApplication": {
        "expressID": 5,
        "type": 639542469,
        "ApplicationDeveloper": {
          "expressID": 1,
          "type": 4251960020,
          "Identification": null,
          "Name": {
            "type": 1,
            "value": "Autodesk Revit 2021 (ESP)"
          },
          "Description": null,
          "Roles": null,
          "Addresses": null
        },
        "Version": {
          "type": 1,
          "value": "2021"
        },
        "ApplicationFullName": {
          "type": 1,
          "value": "Autodesk Revit 2021 (ESP)"
        },
        "ApplicationIdentifier": {
          "type": 1,
          "value": "Revit"
        }
      },
      "State": null,
      "ChangeAction": {
        "type": 3,
        "value": "NOCHANGE"
      },
      "LastModifiedDate": null,
      "LastModifyingUser": null,
      "LastModifyingApplication": null,
      "CreationDate": {
        "type": 4,
        "value": 1606175882
      }
    },
    "Name": {
      "type": 1,
      "value": "Pset_DoorCommon"
    },
    "Description": null,
    "HasProperties": [
      {
        "expressID": 243,
        "type": 3650150729,
        "Name": {
          "type": 1,
          "value": "IsExternal"
        },
        "Description": null,
        "NominalValue": {
          "type": 2,
          "label": "IFCBOOLEAN",
          "valueType": 3,
          "value": "F"
        },
        "Unit": null
      },
      {
        "expressID": 22495,
        "type": 3650150729,
        "Name": {
          "type": 1,
          "value": "Reference"
        },
        "Description": null,
        "NominalValue": {
          "type": 2,
          "label": "IFCIDENTIFIER",
          "valueType": 1,
          "value": "80 x 210 cm"
        },
        "Unit": null
      },
      {
        "expressID": 22496,
        "type": 3650150729,
        "Name": {
          "type": 1,
          "value": "ThermalTransmittance"
        },
        "Description": null,
        "NominalValue": {
          "type": 2,
          "label": "IFCTHERMALTRANSMITTANCEMEASURE",
          "valueType": 4,
          "value": 3.7021
        },
        "Unit": null
      }
    ]
  },
  {
    "expressID": 22500,
    "type": 1451395588,
    "GlobalId": {
      "type": 1,
      "value": "19MC2lCED1MevcaQOOuCEu"
    },
    "OwnerHistory": {
      "expressID": 41,
      "type": 1207048766,
      "OwningUser": {
        "expressID": 38,
        "type": 101040310,
        "ThePerson": {
          "expressID": 35,
          "type": 2077209135,
          "Identification": null,
          "FamilyName": {
            "type": 1,
            "value": ""
          },
          "GivenName": {
            "type": 1,
            "value": "CYPE"
          },
          "MiddleNames": null,
          "PrefixTitles": null,
          "SuffixTitles": null,
          "Roles": null,
          "Addresses": null
        },
        "TheOrganization": {
          "expressID": 37,
          "type": 4251960020,
          "Identification": null,
          "Name": {
            "type": 1,
            "value": ""
          },
          "Description": {
            "type": 1,
            "value": ""
          },
          "Roles": null,
          "Addresses": null
        },
        "Roles": null
      },
      "OwningApplication": {
        "expressID": 5,
        "type": 639542469,
        "ApplicationDeveloper": {
          "expressID": 1,
          "type": 4251960020,
          "Identification": null,
          "Name": {
            "type": 1,
            "value": "Autodesk Revit 2021 (ESP)"
          },
          "Description": null,
          "Roles": null,
          "Addresses": null
        },
        "Version": {
          "type": 1,
          "value": "2021"
        },
        "ApplicationFullName": {
          "type": 1,
          "value": "Autodesk Revit 2021 (ESP)"
        },
        "ApplicationIdentifier": {
          "type": 1,
          "value": "Revit"
        }
      },
      "State": null,
      "ChangeAction": {
        "type": 3,
        "value": "NOCHANGE"
      },
      "LastModifiedDate": null,
      "LastModifyingUser": null,
      "LastModifyingApplication": null,
      "CreationDate": {
        "type": 4,
        "value": 1606175882
      }
    },
    "Name": {
      "type": 1,
      "value": "Pset_ManufacturerTypeInformation"
    },
    "Description": null,
    "HasProperties": [
      {
        "expressID": 22499,
        "type": 3650150729,
        "Name": {
          "type": 1,
          "value": "Manufacturer"
        },
        "Description": null,
        "NominalValue": null,
        "Unit": null
      }
    ]
  },
  {
    "expressID": 22502,
    "type": 1451395588,
    "GlobalId": {
      "type": 1,
      "value": "0ui4y2C8T1fx8lujZmOakz"
    },
    "OwnerHistory": {
      "expressID": 41,
      "type": 1207048766,
      "OwningUser": {
        "expressID": 38,
        "type": 101040310,
        "ThePerson": {
          "expressID": 35,
          "type": 2077209135,
          "Identification": null,
          "FamilyName": {
            "type": 1,
            "value": ""
          },
          "GivenName": {
            "type": 1,
            "value": "CYPE"
          },
          "MiddleNames": null,
          "PrefixTitles": null,
          "SuffixTitles": null,
          "Roles": null,
          "Addresses": null
        },
        "TheOrganization": {
          "expressID": 37,
          "type": 4251960020,
          "Identification": null,
          "Name": {
            "type": 1,
            "value": ""
          },
          "Description": {
            "type": 1,
            "value": ""
          },
          "Roles": null,
          "Addresses": null
        },
        "Roles": null
      },
      "OwningApplication": {
        "expressID": 5,
        "type": 639542469,
        "ApplicationDeveloper": {
          "expressID": 1,
          "type": 4251960020,
          "Identification": null,
          "Name": {
            "type": 1,
            "value": "Autodesk Revit 2021 (ESP)"
          },
          "Description": null,
          "Roles": null,
          "Addresses": null
        },
        "Version": {
          "type": 1,
          "value": "2021"
        },
        "ApplicationFullName": {
          "type": 1,
          "value": "Autodesk Revit 2021 (ESP)"
        },
        "ApplicationIdentifier": {
          "type": 1,
          "value": "Revit"
        }
      },
      "State": null,
      "ChangeAction": {
        "type": 3,
        "value": "NOCHANGE"
      },
      "LastModifiedDate": null,
      "LastModifyingUser": null,
      "LastModifyingApplication": null,
      "CreationDate": {
        "type": 4,
        "value": 1606175882
      }
    },
    "Name": {
      "type": 1,
      "value": "Pset_QuantityTakeOff"
    },
    "Description": null,
    "HasProperties": [
      {
        "expressID": 22495,
        "type": 3650150729,
        "Name": {
          "type": 1,
          "value": "Reference"
        },
        "Description": null,
        "NominalValue": {
          "type": 2,
          "label": "IFCIDENTIFIER",
          "valueType": 1,
          "value": "80 x 210 cm"
        },
        "Unit": null
      }
    ]
  }
]

Leave a Comment