Skip to content

jeanbono/json-pathfinder

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 

Repository files navigation

JSON Pathfinder

JSON Pathfinder is a javascript library dedicated to finding the line number for a given json path in a json string

Installation

Use the package manager npm to install json-pathfinder.

npm -i @jeanbono/json-pathfinder

Usage

import { jsonPathfinder } from '@jeanbono/json-pathfinder';

const jsonString = '{\n\
    "foo": "bar",\n\
    "baz": [{ \n\
        "hello": "world" \n\
    }]\n\
}';

// parse the json string
const pathfinder = jsonPathfinder(jsonString);

// returns line number 4
console.log(pathfinder('baz[0].hello'));

Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

License

ISC

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors