Skip to content

ashphy/jsonpath-js

Repository files navigation

jsonpath-js

GitHub License NPM Version Link Checker

An implementation of RFC 9535 JSONPath

Features

  • 100% Compatible with RFC 9535

Install

npm install jsonpath-js

Usage

import { JSONPathJS } from "jsonpath-js";

const query = new JSONPathJS("$.users[*].name");
const result = query.find({
  users: [{ name: "John Doe" }, { name: "Jane Doe" }],
});

// [ 'John Doe', 'Jane Doe' ]
console.log(result);

Development

npm install
npm run test