Searches and replace values at every level of nested json
Give us a ⭐ if you like our work ❤️
Please consider donating, if you like my work
$ npm install json-nested-replace const jnestedReplace = require('json-nested-replace'); const INPUT_JSON = { 'name': 'json-nested-replace', 'author': 'Arshad Kazmi', 'repository': { 'url': 'https://github.com/arshadkazmi42/json-nested-replace', 'language': 'js' } }; const replacedJSONValue = jnestedReplace(INPUT_JSON, 'json-nested-replace', 'jnested-replace'); console.log(replacedJSONValue); // Output /** { * 'name': 'jnested-replace', * 'author': 'Arshad Kazmi', * 'repository': { * 'url': 'https://github.com/arshadkazmi42/jnested-replace', * 'language': 'js' * } * } **/ const replacedStringValue = jnestedReplace('json-nested-replace', 'json-nested', 'jnested'); console.log(replacedStringValue) // Output // jnested-replaceInterested in contributing to this project? You can log any issues or suggestion related to this library here
Read our contributing guide on getting started with contributing to the codebase
