Learn about our RFC process, Open RFC meetings & more.Join in the discussion! »

@json-edit/json-edit

1.0.2 • Public • Published

json-edit

This module give you ability to manipulate JSON Object.

Features:

  • Delete json node (recursive/non-recursive/)
  • Delete json node nested inside array
  • Replace key with new value
  • Delete json node (key contains given vale)

Install

npm i @json-edit/json-edit

Initialize

const jsonEdit = require('@json-edit/json-edit');

How to use

  1. Delete Node
jsonEdit.deleteNode(json, keyToDelete, isRecursive = true);
  1. Replace Key with New Value
jsonEdit.replaceValue(json, keyToReplace, newValue);
  1. Delete Value in nested array
jsonEdit.deleteValueInStringArray(json, keyToMatch, valueToDelete);

Install

npm i @json-edit/json-edit

DownloadsWeekly Downloads

3

Version

1.0.2

License

MIT

Unpacked Size

11.7 kB

Total Files

6

Last publish

Collaborators

  • avatar