About 751,000 results
Open links in new tab
  1. Working with JSON in ServiceNow Scripts

    Apr 9, 2025 · 📦 Working with JSON in ServiceNow Scripts. I keep a few useful code snippets in a fix script on my personal instance for reference, and I find myself returning to them frequently. One technique I've been using more and more is organizing data using JSON objects rather than multi-dimensional arrays. JSON makes data more readable, maintainable ...

  2. JSON - ServiceNow Developers

    ServiceNow provides JavaScript APIs for use within scripts running on the ServiceNow platform to deliver common functionality. This reference lists available classes and methods along with parameters, descriptions, and examples to make extending the ServiceNow platform easier.

  3. Accessing script includes from client script - ServiceNowWithRunjay

    When you are in a client script and need to retrieve information at the database level, the best practice is to use GlideAjax. In some cases, you would need to retrieve multiple values. The best way to return data from server to client is using JSON.

  4. How to parse a JSON response in ServiceNow?

    May 7, 2023 · In ServiceNow, parsing a JSON response involves using the JSON.parse () function to convert the JSON data into a JavaScript object. Here's an example code snippet: gs.info(data[i].name); In this example, the response variable contains a JSON string that represents an array of objects with id and name properties.

  5. JSON file import examples - Product Documentation ... - ServiceNow

    Learn how to import JSON files into ServiceNow with examples and best practices for data integration and management.

  6. Solved: How to retrieve JSON object returned from script i ... - ServiceNow

    service.serviceline = globalInv.u_service_line.toString(); service.servicegroup = globalInv.u_service_group.toString(); return JSON.stringify(service); }, type: 'GlobalInvestment' client script. if (isLoading || newValue === '') { return; var globalInvAjax = new GlideAjax('GlobalInvestment');

  7. Trying to parse and access the item in a JSON object

    Dec 23, 2021 · You should use ServiceNow's JSON wrapper for parsing and stringifying your objects. The JSON wrapper code lives in a Script Include called JSON which you can peruse. Several ES5 methods are available to you - including the forEach() method.

  8. JSON Client-Side Script · ServiceNow1

    The client-side code shown here would be wrapped in a function (onLoad (), onSubmit (), or onChange ()) depending on the type of client-side script. The JSON.parse () method creates an object from a JSON formatted string.

  9. How to parse JSON data in Script Include - ServiceNow

    Aug 1, 2022 · var reqeustJSONParser = JSON. parse (validJSON); I think this should be as follows; var reqeustJSONParser = JSON. parse (requestData); Hopefully, this will help you debug your code.

  10. Solved: How to parse a JSON response in a Client script co ... - ServiceNow

    Apr 13, 2022 · I am trying to retrieve JSON objects in a client script which receives the JSON response from a Script include through GlideAJAX. However, I am unable to make it work inside the Client script by using JSON.parse and several other ways that I have tried.

  11. Some results have been removed
Refresh