Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Searches and replace values at every level of nested json

License

NotificationsYou must be signed in to change notification settings

arshadkazmi42/json-nested-replace

Repository files navigation

BuildNPM VersionNPM DownloadsGithub Repo SizeLICENSEContributorsCommit

Searches and replace values at every level of nested json

Give us a ⭐ if you like our work ❤️

Install

$ npm install json-nested-replace

Usage

constjnestedReplace=require('json-nested-replace');constINPUT_JSON={'name':'json-nested-replace','author':'Arshad Kazmi','repository':{'url':'https://github.com/arshadkazmi42/json-nested-replace','language':'js'}};constreplacedJSONValue=jnestedReplace(INPUT_JSON,'json-nested-replace','jnested-replace',['url']);console.log(replacedJSONValue);// Output/** { *   'name': 'jnested-replace', *   'author': 'Arshad Kazmi', *   'repository': { *     'url': 'https://github.com/arshadkazmi42/json-nested-replace', *     'language': 'js' *   } * } **/

Function Parameters

FunctionjnestedReplace takes following parameters respectively

  • input: Object/Array on which nested replace to apply
  • searchValue: Value which needs to be replaced in the JSON
  • newValue: New Value which needs to be added in place of searchValue
  • skipKeys: Optinal field, if any key needs to be skipped from this replacing

Contributing

Interested in contributing to this project?You can log any issues or suggestion related to this libraryhere

Read our contributingguide on getting started with contributing to the codebase

Contributors

Thank you to all the contributors who have helped us in making this project better 🙌

About

Searches and replace values at every level of nested json

Topics

Resources

License

Contributing

Stars

Watchers

Forks

Sponsor this project

 

Packages

No packages published

Contributors5


[8]ページ先頭

©2009-2025 Movatter.jp