Skip to content

Instantly share code, notes, and snippets.

@ebourmalo
Created February 12, 2016 09:39
Show Gist options
  • Save ebourmalo/9e03235527edb1dab463 to your computer and use it in GitHub Desktop.
Save ebourmalo/9e03235527edb1dab463 to your computer and use it in GitHub Desktop.
esnextbin sketch
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>ESNextbin Sketch</title>
<!-- put additional styles and scripts here -->
</head>
<body>
<!-- put markup and other contents here -->
</body>
</html>
// write ES2015 code and import modules from npm
// and then press "Execute" to run your program
var dot = require('mongo-dot-notation');
var update = { variables13:
{ '51:001': '04/01/2016',
'51:002': '31/01/2016',
'00:100': 151.6667,
'00:101': 35,
'96:202': 'Ouvrables',
'96:200': 'Ouvrables',
'06:200': '75',
'00:300': 3218 },
actions: { '811': true } }
console.log(dot.flatten(update));
{
"name": "esnextbin-sketch",
"version": "0.0.0",
"dependencies": {
"mongo-dot-notation": "1.0.4"
}
}
'use strict';
// write ES2015 code and import modules from npm
// and then press "Execute" to run your program
var dot = require('mongo-dot-notation');
var update = { variables13: { '51:001': '04/01/2016',
'51:002': '31/01/2016',
'00:100': 151.6667,
'00:101': 35,
'96:202': 'Ouvrables',
'96:200': 'Ouvrables',
'06:200': '75',
'00:300': 3218 },
actions: { '811': true } };
console.log(dot.flatten(update));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment