---
sourceDocument: Xanadu API Reference
sourceDocumentLink: https://www.servicenow.com/docs/r/xanadu/api-reference

 Release :

    - xanadu

ft:locale :

    - en-US

ft:publication_title :

    - Xanadu API Reference

ft:clusterId :

    - crapiref

bundleId :

    - crapiref

workflow :

    - Creator


---

# GlideJsonPath - Global

# GlideJsonPath - Global {#ariaid-title1}

* Release version: Xanadu
* 
* Updated August 1, 2024
* 
* ![](https://www.servicenow.com/docs/portal-asset/ico-clock) 1 minute to read

The GlideJsonPath API retrieves values from a JSON document using a query path string.

This API is available by default.

## GlideJsonPath - GlideJsonPath(String jsonDocument) {#ariaid-title2}

Instantiates a GlideJsonPath scriptable object by parsing a JSON document.
{#GlideJsonPath-GlideJsonPath_S__table_otc_rhk_ywb__entry__3}

| Name | Type | Description |
|-|-|-|
| jsonDocument | String | JSON document to parse. |
[Table 1. Parameters]

{#GlideJsonPath-GlideJsonPath_S__table_otc_rhk_ywb}  
This example instantiates a GlideJsonPath object by parsing a JSON document.

    var v = new GlideJsonPath('{"lib":{"jsonpath":{"creator":{"name":"DevStudio","developers":["dev1","dev2","dev3"]}}}}');

## GlideJsonPath - read(String jsonPath) {#ariaid-title3}

Retrieves values from a JSON document using a query path string.
{#GlideJsonPath-read_S__table_l4w_xhk_ywb__entry__3}

| Name | Type | Description |
|-|-|-|
| jsonPath | String | Path to search for in the JSON document. All valid JSONPath expressions are supported. For more information, see [JSONPath](https://jsonpath.com/). |
[Table 2. Parameters]

{#GlideJsonPath-read_S__table_l4w_xhk_ywb} {#GlideJsonPath-read_S__table_m4w_xhk_ywb__entry__2}

| Type | Description |
|-|-|
| Object | JavaScript object(s) that match the specified path. |
[Table 3. Returns]

{#GlideJsonPath-read_S__table_m4w_xhk_ywb}  
This example searches a JSON document for all developers listed under the specified path.

    var v = new GlideJsonPath('{"lib":{"jsonpath":{"creator":{"name":"DevStudio","developers":["dev1","dev2","dev3"]}}}}'); 
    var l = v.read("$['lib']['jsonpath']['creator']['developers'][*]");

Output:

    "dev1", "dev2", "dev3"


