Skip to content

strivedata/mongo-json-escape

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

mongo-json-escape

Escape MongoDB reserved characters $ and . from JSON objects. This way you can store JSON objects containing these characters in your database.

Installation

$ npm install mongo-json-escape

Example

var mje = require('mongo-json-escape');

mje.escape({"hello.world":"hello"});
mje.unescape({"hello\uFF0Eworld":"hello");

key.escape({"hello$world":"hello"});
key.unescape({"hello\uFF04world":"hello"});

License

MIT

About

Escape MongoDB reserved characters from JSON objects.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published