# @tush-tr/jsonmapper

> A nodejs library which allows you to assign a json file values with another json file and create a new desired json file.

Latest version **1.0.1** (published 2022-03-03) · MIT license · 0 weekly downloads

## Install

```sh
npm install @tush-tr/jsonmapper
pnpm add @tush-tr/jsonmapper
yarn add @tush-tr/jsonmapper
bun add @tush-tr/jsonmapper
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.1 |
| Published | 2022-03-03 |
| First published | 2022-03-03 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 5 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | @tush-tr |
| Maintainers | tush-tr |

## Links

- npm: https://www.npmjs.com/package/@tush-tr/jsonmapper
- Repository: https://github.com/tush-tr/jsonmapper
- Homepage: https://github.com/tush-tr/jsonmapper#readme
- Issues: https://github.com/tush-tr/jsonmapper/issues
- npm.io page: https://npm.io/package/@tush-tr/jsonmapper

## Recent versions

- 1.0.1 (latest) — 2022-03-03
- 1.0.0 — 2022-03-03

## README

<img src="https://img.shields.io/github/issues/tush-tr/jsonmapper"> <img src="https://img.shields.io/github/forks/tush-tr/jsonmapper"> <img src="https://img.shields.io/github/license/tush-tr/jsonmapper"> <img src="https://img.shields.io/github/stars/tush-tr/jsonmapper"> <a href="https://twitter.com/tush_tr604" target="blank"><img src="https://img.shields.io/twitter/follow/tush_tr604?logo=twitter&style=flat" alt="tush_tr604" /></a> <img src="https://img.shields.io/github/languages/count/tush-tr/jsonmapper">

# JsonMapper
A nodejs library which allows you to assign a json file values with another json file and create a new desired json file.

## Installing the package
```sh
npm install @tush-tr/jsonMapper
```

## Import the package

```js
const {objectFill,jsonFill} = require('@tush-tr/jsonmapper')
```

## Functions

### objectFill

```js
const desiredObj = objectFill(target, source)
```

#### Example:

```js
const {objectFill,jsonFill} = require('@tush-tr/jsonmapper')
const targetObj = {
    name: "Rahul",
    class: 12
}

const sourceObj = {
    class: 10,
    role: "Monitor",
    name: "Tushar"
}
const assignedObj = objectFill(targetObj,sourceObj)
console.log(assignedObj)
// { name: 'Tushar', class: 10 }
```

### jsonFill

```js
let assignJson = jsonFill(targetFilePath, sourceFilePath, outputJsonFilePath)
```

#### Example:

```js
const fillJson = jsonFill('target.json','source.json','output.json')
console.log(fillJson)
// done...
```

# Contributing 🍻

I welcome pull requests, bug fixes and issue reports. Before proposing a change, please discuss your change by raising an issue.

# Maintainer 😎

[Tushar Rajpoot](https://twitter.com/tush_tr604)


## License

[MIT license](LICENSE) © Tushar Rajpoot

---
_Source: https://npm.io/package/@tush-tr/jsonmapper · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
