GlideJsonPath - Global

  • 릴리스 버전: Australia
  • 업데이트 날짜 2026년 03월 12일
  • 소요 시간: 2분
  • The GlideJsonPath API retrieves values from a JSON document using a query path string.

    This API is available by default.

    GlideJsonPath - GlideJsonPath(String jsonDocument)

    Instantiates a GlideJsonPath scriptable object by parsing a JSON document.

    표 1. Parameters
    Name Type Description
    jsonDocument String JSON document to parse.

    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)

    Retrieves values from a JSON document using a query path string.

    표 2. Parameters
    Name Type Description
    jsonPath String Path to search for in the JSON document.

    All valid JSONPath expressions are supported. For more information, see JSONPath.

    표 3. Returns
    Type Description
    Object JavaScript object(s) that match the specified path.

    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"