|
| Help with some odd JSON - SOLVED |
| Iniciado por guest, 15,ago. 2018 20:15 - 2 respuestas |
| |
| | | |
|
| |
| Publicado el 15,agosto 2018 - 20:15 |
Hi,
I'm working with an API to a product called smartwaiver and have hit upon a weird section of JSON that I don''t know to deal with. I've reached out to vendor but anticipating the possibility that they'll be inflexible I wonder if anyone here has any ideas?
From my perspective, this section ( "customWaiverFields") is not a proper object and I don't see how I could walk my way through it the way I normally would using "..occurrence" and a FOR statement
"customWaiverFields": { "5b3e396177f36": { "value": "Mobile", "displayText": "Preferred Phone" }, "5b3e39617c644": { "value": "18027930328", "displayText": "Preferred Phone Number" }, "5b3e396180c06": { "value": "Robyn Anderson", "displayText": "Name as it appears on your passport (Last, First, Middle)" }, "5b3e39618670a": { "value": "347548458548", "displayText": "Passport Number" }, "5b3e39618b123": { "value": "usa", "displayText": "Nationality" }, "5b3e39618f83f": { "value": "Aug 13, 2018", "displayText": "Passport Issue Date" }, "5b3e396193eff": { "value": "Aug 13, 2018", "displayText": "Passport Expiration" }, "5b3e3961994e3": { "value": "Aug 13, 2018", "displayText": "Departure Date from the US" }, "5b3e39619e675": { "value": "fgjsrjs", "displayText": "Important Allergies or Medical Condition(s) (if none, please enter \"None\")" }, "5b3e3961c1e24": { "value": "fjsrjsry", "displayText": "Relevant Additional Notes or Comments" }, "5b3e3ccf1feba": { "value": "Yes", "displayText": "Please send paper documents via USPS" }, "5b3e3ccf2589e": { "value": "Yes", "displayText": "Please send electronic documents via email" }, "5b3e3c1aaa656": { "value": "Yes", "displayText": "Please send room upgrade options and costs" }, "5b3e3c1a99af6": { "value": "Non-Smoking", "displayText": "Non-Smoking or Smoking Room?" }, "5b3e3c1a9f2d1": { "value": "One Bed", "displayText": "Bed Preference" } } |
| |
| |
| | | |
|
| | |
| |
| Publicado el 15,agosto 2018 - 20:20 |
FTR... this is what I would have expected this section to be formatted like
"customWaiverFields": [
{ "GUID": "5b3e396177f36", "value": "Mobile", "displayText": "Preferred Phone" }, { "GUID": "5b3e39617c644" , "value": "18027930328", "displayText": "Preferred Phone Number" },
{ "GUID": "5b3e396180c06", "value": "Robyn Anderson", "displayText": "Name as it appears on your passport (Last, First, Middle)" } ] |
| |
| |
| | | |
|
| | |
| |
| Publicado el 15,agosto 2018 - 20:55 |
this worked.
arrArrayGUID is array of strings FOR EACH x OF vWaivers2.waiver.customWaiverFields..Member // info("The member " + x..Name + " has the value " + x..Value)
ArrayAdd(arrArrayGUID,x..Name)
END
FOR EACH x OF arrArrayGUID
Info(vWaivers2.waiver.customWaiverFields[x].value)
END |
| |
| |
| | | |
|
| | | | |
| | |
|