jsonfiller

1.0.0 • Public • Published

What is this?

This is an NPM packge to fill JSONs with objects attributes.

Instalation

npm i jsonFiller --save

Then ...

import { jsonFiller } from 'jsonFiller';

/* example object */
let object = {
    id: 123,
    name: 'Jon Doe',
    company: 'Skynet'
}
let jsonMap = {
    userId: object.id,
    userName: object.name,
    userCompany: object.company
}

let jsonFilled = jsonFiller(object, jsonMap);
/* 
 * This module will return a json with filled values:
 * {
 *   userId: 123,
 *   userName: 'Jon Doe',
 *   userCompany: 'Skynet'
 * }
 */
console.log(jsonFilled);

```

Readme

Keywords

Package Sidebar

Install

npm i jsonfiller

Weekly Downloads

0

Version

1.0.0

License

ISC

Unpacked Size

1.29 kB

Total Files

3

Last publish

Collaborators

  • octaedro