cancel
Showing results for 
Search instead for 
Did you mean: 

Need a null check or exists check for this Mutiple vs single typeof

jmcmahon
New Contributor II

[image]

I think I need another check to see if this node actually exists in the json or payload. I have tried hasOwnProperty() and hasPath()

Any other suggestions?

typeof $[‘wd:Submit_Published_Course_Section_Request’][‘wd:Published_Course_Section_Data’][‘wd:Course_Section_Data_Data’][‘wd:Published_Instructor_Roles_Reference’] == “array” ? jsonPath($, “$[‘wd:Submit_Published_Course_Section_Request’][‘wd:Published_Course_Section_Data’][‘wd:Course_Section_Data_Data’][‘wd:Published_Instructor_Roles_Reference’][*][‘wd:ID’][‘$’]”):sl.ensureArray($[‘wd:Submit_Published_Course_Section_Request’][‘wd:Published_Course_Section_Data’][‘wd:Course_Section_Data_Data’][‘wd:Published_Instructor_Roles_Reference’][‘wd:ID’][‘$’])

image

1 REPLY 1

jmcmahon
New Contributor II

Resolved this on the custom SOAP envelope to see if the array is null.

!= ‘[null]’)