# @sir_koty/json-extractor

> this library make easy the way to extract property into a json object

Latest version **1.0.1** (published 2020-11-20) · ISC license · 0 weekly downloads

## Install

```sh
npm install @sir_koty/json-extractor
pnpm add @sir_koty/json-extractor
yarn add @sir_koty/json-extractor
bun add @sir_koty/json-extractor
```

## Health

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

Positive: has types; no vulnerabilities; high quality score.

Warnings: low downloads; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.1 |
| Published | 2020-11-20 |
| First published | 2020-11-20 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 6.6 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | bleukoty@gmail.com |
| Maintainers | sir_koty |
| Keywords | json extraction, extraction |

## Links

- npm: https://www.npmjs.com/package/@sir_koty/json-extractor
- Repository: https://github.com/bleukoty/json-extractor
- Homepage: https://github.com/bleukoty/json-extractor#readme
- Issues: https://github.com/bleukoty/json-extractor/issues
- npm.io page: https://npm.io/package/@sir_koty/json-extractor

## Alternatives

- [@mapbox/jsonlint-lines-primitives](https://npm.io/package/@mapbox/jsonlint-lines-primitives.md) — 5.3M weekly downloads
- [reftools](https://npm.io/package/reftools.md) — 3.5M weekly downloads
- [@hey-api/openapi-ts](https://npm.io/package/@hey-api/openapi-ts.md) — 3.5M weekly downloads
- [@mapbox/geojson-rewind](https://npm.io/package/@mapbox/geojson-rewind.md) — 2.4M weekly downloads
- [turbo-stream](https://npm.io/package/turbo-stream.md) — 1.7M weekly downloads

## Recent versions

- 1.0.1 (latest) — 2020-11-20
- 1.0.0 — 2020-11-20

## README

# JSON-EXTRACTOR

This library make easy the way to extract property into a json object

## Installation

Usage the npm package manager [npm](https://www.npmjs.com/) to install json-extractor

```bash
npm install @sir_koty/json-extractor
```

## Usage

```javascript
import { jsonExtract } from '@sir_koty/json-extractor';

const myData = { person: { 
                            firstname: 'J@mes', 
                            lastname: 'Bond'
                 },
                 country: {
                            name: 'Ivory Coast',
                            code: 225
                  }
                };
const propertiesToExtract = ['person/firstname+lastname@fullname', 'country/name'];
const newJson = jsonExtract(myData, propertiesToExtract);

// newJson value {fullname: 'J@mes Bond', country__name: 'Ivory Coast' }
console.log('newJson value ', newJson);

```
## Demo
[Sample on Stackblitz](https://stackblitz.com/edit/json-extractor-sample?file=index.js)

## License
[MIT](https://choosealicense.com/licenses/mit/)

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