---
schema_version: "1"
id: ca07e04c00fb8b4d2a4041154c1b9c0bf9def8989d22e5217067917ed92f078c
title: json Functions
collection: developer
version: current
locale: en-us
portal_url: https://docs.salesforce.com/developer/current/en-us/analytics/bi_dev_guide_wave_templates/guides/reference/bi-templatesdev-functions-json.md
canonical_url: https://developer.salesforce.com/docs/analytics/bi-dev-guide-wave-templates/guide/bi-templatesdev-functions-json.html
source_site: developer.salesforce.com
content_type: documentation
content_hash: 9b17fc7c9a8d59014e4b48ad573888fd5b0715049bcb2a232ccb687083e0beef
products:
  - Analytics Templates Developer Guide
  - analytics
---

# json Functions

Use json functions in rules to manipulate JSON at runtime. For example, find all the JSON paths in a dashboard that have a link widget and update the links at runtime.

## Function Name: searchPaths

Parameters: String `jsonPath`

Returns: `Collection<String>` See _Description_ for detail.

Recursive: Not supported

Description: Searches the current JSON document and returns matching fully qualified JSON paths. If no results are found, returns an empty array. If more than one item is found, returns an array of JSON paths.

## Example

```nolang
${json:searchPaths('$.state.widget..[?(@.type in [\"link\"])]')}
```

run on a dashboard returns all JSON paths in the dashboard with link widgets:

```nolang
["$['state']['widgets']['link3']", "$['state']['widgets']['link4']", "$['state']['widgets']['link1']", "$['state']['widgets']['link2']" ].
```

These paths can be used to make runtime updates to the links in the dashboard.

## Function Name: searchValues

Parameters: String `jsonPath`

Returns: `Collection<Object>` See _Description_ for detail.

Recursive: Not supported

Description: Searches the current JSON document and returns values of the matching nodes. If no results are found, returns an empty array. If more than one item is found, returns an array of objects.

## Example

```nolang
${json:searchValues('$.path.to.json.object')}
```

If this function is called outside of rules execution, an error is thrown.
