Novel Planetary Movement

    json-fields

    0.0.0 • Public • Published

    json-fields

    Build status

    JSON.parse and JSON.stringify for certain properties of an object

    install

    $ npm install json-fields
    

    example

    JSON.parse some fields of an object:

    var jsonfields = require('json-fields');
     
    var obj = {
      'x-json-user':'{"name":"bob"}',
      'x-json-thing':'{"apple":"green"}',
      'normalfield':'{"a":10}'
    }
     
    var parsedobj = jsonfields.parse(obj, 'x-json');

    JSON.stringify some fields of an object:

    var jsonfields = require('json-fields');
     
    var obj = {
      'x-json-user':{
        name:'bob'
      },
      'x-json-thing':{
        apple:'green'
      },
      'normalfield':'{"a":10}'
    }
     
    var stringobj = jsonfields.stringify(obj, 'x-json');

    licence

    MIT

    Keywords

    none

    Install

    npm i json-fields

    DownloadsWeekly Downloads

    2

    Version

    0.0.0

    License

    MIT

    Last publish

    Collaborators

    • binocarlos