---
source_url: https://www.pubnub.com/docs/serverless/functions/functions-apis/jsonpath-plus
title: JSONPath Plus
updated_at: 2026-06-04T11:13:42.686Z
---

> Documentation Index
> For a curated overview of PubNub documentation, see: https://www.pubnub.com/docs/llms.txt
> For the full list of all documentation pages, see: https://www.pubnub.com/docs/llms-full.txt


# JSONPath Plus

[JSONPath Plus](https://www.npmjs.com/package/jsonpath-plus) is a library for analyzing, transforming, and selectively extracting data from JavaScript Object Notation (JSON) documents and JavaScript objects.

PubNub Functions provides native support for this library in versions `9.0.0+`.

The `jsonpath` module is available via the following `require()` statement:

```javascript
const {JSONPath} = require('jsonpath'); 
```

## Exposed constructors

This library exposes `JSONPath`, which you use to query and manipulate JSON data. Use this entry point to perform operations on your data.

## Example

```js
        const {JSONPath} = require('jsonpath');        
        
        const json_sample = {
          store: {
            book: [
              {
                category: "reference",
                author: "Nigel Rees",
                title: "Sayings of the Century",
                price: 8.95,
              },
              {
                category: "fiction",
                author: "Evelyn Waugh",
                title: "Sword of Honour",
                price: 12.99,
              },
            ],
            bicycle: {
              color: "red",
              price: 19.95,
            },
          },
        };
            
        export default req => {
            const result = JSONPath({ path: "$.store.book[*].author", json: json_sample });
            //should be ['Nigel Rees', 'Evelyn Waugh']
            return req.ok({
                result: result
            });
        };
```

:::note Functions support
Functions provides a rich set of tools. For help with situations not covered here, contact [PubNub Support](https://www.pubnub.com/docs/mailto:support@pubnub.com).
:::