Dealing with API response that sometimes an object and sometimes an array #974
Unanswered
chrisrhymes
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I have a strange situation where the API I am using sometimes sends the property as an object, but when there are multiple it sends the property as an array. Yes, this is using SOAP and the SOAP_SINGLE_ELEMENT_ARRAYS doesn't work in this case as I have another problem getting the WSDL to work.
Here is a basic example of what I am talking about. The real object is very large with many nested levels.
Sometimes like this:
Other times there are multiple like this:
Can I use a Transform to always make it an array or Collection, even when it is an object? If so, is there a guide on this in the documentation as I couldn't see it. Thank you.
Beta Was this translation helpful? Give feedback.
All reactions