Convert object to to dot notation.
var toDot = require('to-dot');
var user = {
name: {
first: 'Joe',
last: 'M'
}
};
console.log(toDot(user));
/*
{
'name.first': 'Joe',
'name.last': 'M'
}
*/
$ npm install to-dot
return converted dot-notation object from obj
.
MIT