Sign Up for Free

RunKit +

Try any Node.js package right in your browser

This is a playground to test code. It runs a full Node.js environment and already has all of npm’s 1,000,000+ packages pre-installed, including jsonium with all npm packages installed. Try it out:

var Jsonium = require('jsonium'); var j = new Jsonium(); var templates = [ {a: [{c: '{{k2}}', d: '{{k1}}'}, {c: '{{k2}}', d: '{{k1}}'}]}, {a: [{c: '{{k1}}', d: '{{k2}}'}, {c: '{{k1}}', d: '{{k2}}'}]} ]; var keys = ['a.@each.{c,d}']; var combos = [ {k1: 'v11', k2: '21'}, {k1: 'v12', k2: '22'}, {k1: 'v13', k2: '23'}, {k1: 'v14', k2: '24'} ]; var result = j .setTemplates(templates) .createCombos(keys, combos) .uniqueCombos() .getCombos(); console.log(result); console.log(JSON.stringify(result, null, 2));

This service is provided by RunKit and is not affiliated with npm, Inc or the package authors.

jsonium v1.5.0

Generator for creating all possible combinations of JSONs according to the provided templates and data sets

RunKit is a free, in-browser JavaScript dev environment for prototyping Node.js code, with every npm package installed. Sign up to share your code.
Sign Up for Free