in this example: "results" : [ { "id" : "xyz" , "title" : "His Honour Judge" , "known_as" : "Joe" , "surname" : "Blogs" , "appointments" : [ { "role" : "Circuit Judge" , "role_name" : "Circuit Judge" , "type" : "Courts" } ... we wish to access the appointments. role value script: var obj = JSON . parse ( resp ); var results = obj . result . results ; for ( var i = 0 ; i < results . length ; i ++) { var sID = results [ i ]. id ; var sRole = results [ i ]. appointments [ i ]. role ; }
All things ServiceNow... take a look at my channel: https://www.youtube.com/@cloudminus89