I have several APIs integrated with my CRM and they work great. I am having some trouble though parsing data out of a large string/array in Funtions? I need to be able to pull the DeviceId and the WebSiteDeviceName from each PanelDevice.
I would appreciate the help.
<?xml version="1.0" encoding="utf-8"?>
<soap:Body>
<GetDeviceListResponse xmlns="
"> <GetDeviceListResult>
<PanelDevice>
<DeviceId>1</DeviceId>
<DeviceIdInPanel>1</DeviceIdInPanel>
<WebSiteDeviceName>Hardwire Translator</WebSiteDeviceName>
<Group>13</Group>
<InstallDate>2022-09-12T22:35:49.44Z</InstallDate>
<MaintainDate>2024-09-07T17:29:12.293</MaintainDate>
<StatusDate>2024-10-02T18:22:44.647</StatusDate>
<Partition>1</Partition>
<MonitoredForNormalActivity>false</MonitoredForNormalActivity>
<Status>
<DeviceStatusEnum>Closed</DeviceStatusEnum>
</Status>
<DeviceType>IQTakeoverModule</DeviceType>
<NonReportingFlag>false</NonReportingFlag>
<ManufacturerSpecificInfo>63018</ManufacturerSpecificInfo>
<IsSecondaryLoop>false</IsSecondaryLoop>
<IsExistingEquipment>false</IsExistingEquipment>
<SerialNumber>46331C</SerialNumber>
<SignalSource>PowerG</SignalSource>
<PartitionList>
<int>1</int>
</PartitionList>
<CentralStationReportingType>Perimeter</CentralStationReportingType>
</PanelDevice>
<PanelDevice>
<DeviceId>2</DeviceId>
<DeviceIdInPanel>2</DeviceIdInPanel>
<WebSiteDeviceName>Front Door</WebSiteDeviceName>
<Group>10</Group>
<InstallDate>2022-09-12T22:35:49.49Z</InstallDate>
<MaintainDate>2024-09-07T17:29:12.303</MaintainDate>
<StatusDate>2025-01-04T18:40:58.77</StatusDate>
<Partition>1</Partition>
<MonitoredForNormalActivity>true</MonitoredForNormalActivity>
<Status>
<DeviceStatusEnum>Closed</DeviceStatusEnum>
</Status>
<DeviceType>Contact</DeviceType>
<NonReportingFlag>false</NonReportingFlag>
<ManufacturerSpecificInfo>63001</ManufacturerSpecificInfo>
<IsSecondaryLoop>false</IsSecondaryLoop>
<IsExistingEquipment>false</IsExistingEquipment>
<SerialNumber>46331C</SerialNumber>
<SignalSource>PowerG</SignalSource>
<PartitionList>
<int>1</int>
</PartitionList>
<CentralStationReportingType>Entry/Exit</CentralStationReportingType>
</PanelDevice>
</GetDeviceListResult>
</GetDeviceListResponse>
</soap:Body>
</soap:Envelope>