dot-notate
Version:
Converts an object into a one dimensional object with its attributes keys separated by . or another separator
52 lines (33 loc) • 824 B
Markdown
dot-notate converts an object into a one dimensional object with its attributes keys separated by . or another separator.
```javascript
var dotNotate = require('dot-notate');
console.log(dotNotate({ this: { is: 'an example' } }));
```
The above code will result in the following object:
```json
{
"this.is": "an example"
}
```
```javascript
var dotNotate = require('dot-notate');
console.log(dotNotate({ this: { is: 'an example' } }, '|'));
```
The above code will result in the following object:
```json
{
"this|is": "an example"
}
```
```
npm install --save dot-notate
```
Johannes Schlicker
This project is licensed under the MIT License.