jsonpath-to-dot

Convert a JSONPath into dotnotation

Usage no npm install needed!

<script type="module">
  import jsonpathToDot from 'https://cdn.skypack.dev/jsonpath-to-dot';
</script>

README

jsonpath-to-dot

build status

Convert a JSONPath into dotnotation.

Example

var toDot = require('jsonpath-to-dot');
console.log(toDot('/tags'));
// 'tags'
console.log(toDot('/tags/1'));
// 'tags.1'
console.log(toDot('/tags/blah'));
// 'tags.blah'

Install

npm install --save jsonpath-to-dot

Test

npm test

License

MIT