Built something you're proud of? Tell the story. A quick G2 review of App Engine or Build Agent helps other developers see what's possible on ServiceNow. Share your experience.

Unable to determine element path for Assert JSON Response Payload Element

kevinharalson
Mega Expert

Using the "Assert JSON Response Payload Element" test step, I am attempting to evaluate the "status" value in the response below, but I have not been able to arrive at the correct element path.

Element paths tried

  • /result/status
  • /result[0]/status
  • result/status
  • result[0]/status
  • /status
  • status

I was able able to use the path of "staging_table" to successfully evaluate its value.


JSON Response

{
  "import_set": "ISET0068987",
  "staging_table": "u_ci_alias_web_service",
  "result": [ {
    "transform_map": "CI Alias Transform",
    "table": "cmdb_alias",
    "display_name": "sys_id",
    "display_value": "Created 2019-10-18 08:47:36",
    "record_link": "https://{instance}.service-now.com/api/now/table/cmdb_alias/37ff4806dbe88c109be2591e5e96199d",
    "status": "inserted",
    "sys_id": "37ff4806dbe88c109be2591e5e96199d"
  }]
}

 

Any help would be appreciated.

1 ACCEPTED SOLUTION
1 REPLY 1