https://github.com/moappi/node-json2json
node.js implementation of the json2json library - restructure your json object
https://github.com/moappi/node-json2json
Last synced: 10 months ago
JSON representation
node.js implementation of the json2json library - restructure your json object
- Host: GitHub
- URL: https://github.com/moappi/node-json2json
- Owner: moappi
- Created: 2013-03-09T01:50:59.000Z (over 13 years ago)
- Default Branch: master
- Last Pushed: 2013-08-20T05:04:53.000Z (almost 13 years ago)
- Last Synced: 2025-06-25T12:55:38.092Z (12 months ago)
- Language: JavaScript
- Size: 117 KB
- Stars: 2
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
node-json2json
=========
What is node-json2json?
------------------
node-json2json is a node module that implements the json restructuring engine json2json for node.js
Installation
------------
npm install node-json2json
Usage
-----
```javascript
var json2json = require('node-json2json');
var data = {'c:areaChart':{'needthis':{'propArea':'value'},'dontneedthis':{}},
'c:pieChart':{'needthis':{'propPie':'value'},'dontneedthis':{}}};
var transform = {'$[var=c:(.+)Chart]':'','chart':'$(var)','stuff':'${c:$(var)Chart.needthis}'};
console.log( json2json.transform(data,transform) );
```
Need more Information?
--------------
json2json is still in a pre-beta mode (hence the 0.0.1 version) so any changes/improvements are greatly appreciated.