json-props-filter

1.0.1 • Public • Published

json-props-filter

Codacy Badge

Description

JSON property sometimes have too many properties. So this module provides filtering unnecessary data.

Requirement

You do not have to install when you would like to use this library. This module is written in pure JavaScript :).

Usage

const data = { foo: "bar", bar: "baz" };
// remove foo property data
const result = jsonPropsFilter(data1, "foo");
// then you can get filtered data => {bar: "baz" }; 

// also you can remove the data from array at once
const data2 = { foo: "bar", bar: "baz", baz: "bug" };
const result3 = jsonPropsFilter(data2, ["foo", "bar"]);
// you can get filtered data => {baz: "bug" }; 

Please check the example codes in the repository.

  • example/basic_usage.js

Install

npm i json-props-filter

Licence

MIT

Readme

Keywords

none

Package Sidebar

Install

npm i json-props-filter

Weekly Downloads

0

Version

1.0.1

License

MIT

Unpacked Size

6.03 kB

Total Files

8

Last publish

Collaborators

  • otokunaga2