1.0.5 • Published 4 years ago

react-json-path-picker v1.0.5

Weekly downloads
25
License
MIT
Repository
github
Last release
4 years ago

react-json-path-picker

It is a json path picker for react based on json-path-picker. You can use it to create a json tree of any legal json string. And then you can click to choose a node in the tree and got the path string of the node from tree's root.

demo

install

npm install --save-dev react-json-path-picker

You need webpack to pack it in your app, and use style-loader and css-loader to ensure the component's style work.

usage

path picker (fully controlled compoment):

<JsonPathPicker json={this.state.json} onChoose={this.onChoosePath} path={this.state.choosenPath} />

onChoosePath = (path)=> {...}

npm.io

tips

if you have a json string like '{"x":1}, {"x":2}, {"x":3}', you can click '"x":1' and then click button before'[', and then you have choosed three x attr in array and finally get path string '*.x'

npm.io

dev

For development: npm run dev

1.0.5

4 years ago

1.0.4

4 years ago

1.0.3

7 years ago

1.0.2

7 years ago

1.0.1

7 years ago

1.0.0

7 years ago