I have data sorted from an xml file that I am parsing on Make. I need to search through the survey_data array collection for an id matching ‘gender’ containing a _value of ‘1’ and if matched, the value returned should be the prompt value.
Here is a screenshot of precisely what I am trying to achieve:
Scratching my head on how to do this due to the way it’s nested.
Here is the output bundle from the parse XML to see the same:
[
{
"breeze_systems_photobooth": {
"_attributes": {
"version": "3.20.1",
"app": "DSLR Remote Pro for Windows",
"id": "76aac7c38041a0b4f18d86107",
"name": "DESKTOP"
},
"event": [
{
"_attributes": {
"id": "eace807208b9da1300b6137fd",
"eventkitegalleryid": null
},
"eventName": [
""
],
"eventString": [
{
"_attributes": {
"id": 1
}
},
{
"_attributes": {
"id": 2
}
},
{
"_attributes": {
"id": 3
}
},
{
"_attributes": {
"id": 4
}
},
{
"_attributes": {
"id": 5
}
}
]
}
],
"photo_information": [
{
"date": [
"2024/03/13"
],
"time": [
"18:44:03"
],
"user_data": [
"emailhere"
],
"survey_data": [
{
"survey3_chkbox1": [
{
"_value": 1,
"_attributes": {
"id": "gender",
"prompt": "Male"
}
}
],
"survey3_chkbox2": [
{
"_value": "0",
"_attributes": {
"id": "gender",
"prompt": "Female"
}
}
],
"survey3_chkbox3": [
{
"_value": "0",
"_attributes": {
"id": "gender",
"prompt": "Nonbinary"
}
}
]
}
],
"uid": [
"MEJ37459"
],
"uid2": [
"KPTFG883"
],
"uid3": [
"JTE796XWE"
],
"eventkitesessionid": [
"DXF335XZK"
],
"prints": [
1
],
"photobooth_images_folder": [
"D:\\OneDrive\\Documents\\PhotoboothImages\\Dell"
],
"download_folder": [
"D:\\OneDrive\\Documents\\PhotoboothImages\\2024-03-13"
],
"digital_zoom": [
100
],
"mirror_output": [
"0"
],
"greenscreen": [
"0"
],
"saveCopyOfProcessedPhotos": [
1
],
"camera_orientation": [
"0"
],
"bw_mode": [
"0"
],
"photos": [
{
"photo": [
{
"_value": "164920.JPG",
"_attributes": {
"image": 1,
"md5": "5371291836317d1e54e6ebb1c20"
}
}
],
"processed": [
{
"photo": [
{
"_value": "processed\\164920.JPG",
"_attributes": {
"image": 1,
"md5": "089c7503ffc748e13e1ed6b0cff"
}
}
]
}
],
"output": [
{
"_value": "prints\\240313_184403.jpg",
"_attributes": {
"md5": "c99b8c8ed398ff54dbc74c7f55b"
}
}
]
}
]
}
]
}
}
]