clinical:json2json

v0.0.1Published 6 years ago

This package has not had recent updates. Please investigate it's current state before committing to using it in your project.

json2json

JSON transformation library for data pipelines using the json2json library.

===============================

Installation

$ meteor add clinical:json2json  

===============================

Basic Usage

Add the following to server/startup.js.

1Meteor.startup(function (){
2  var data = {'c:areaChart':{'needthis':{'propArea':'value'},'dontneedthis':{}},
3          'c:pieChart':{'needthis':{'propPie':'value'},'dontneedthis':{}}};
4
5  var transform = {'$[var=c:(.+)Chart]':'','chart':'$(var)','stuff':'${c:$(var)Chart.needthis}'};
6
7  var result = json2json.transform(data,transform);
8
9  console.log(result);  
10});

===============================

Licensing

MIT. Use as you will.