Skip to content

moappi/node-json2json

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

	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.

About

node.js implementation of the json2json library - restructure your json object

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published