Skip to Content
  • Website
Codsen
  • Home
  • Open Source
  • Articles
  • About

backOpen Source→edit-package-json→Examples

Table of Contents

  • Quick Take
  • Delete an array item by its dot-path index
  • Delete a nested object key
  • Minimal example, del()
  • Minimal example, set()
  • Replace an existing array item by its dot-path index
  • Replace an existing nested value with null
  • Set a numeric value without changing surrounding formatting
  • Replace an object value while preserving outer formatting
↑ back to top

Quick Take

↑ back to top

Delete an array item by its dot-path index

↑ back to top

Delete a nested object key

↑ back to top

Minimal example, del()

↑ back to top

Minimal example, set()

↑ back to top

Replace an existing array item by its dot-path index

↑ back to top

Replace an existing nested value with null

↑ back to top

Set a numeric value without changing surrounding formatting

↑ back to top

Replace an object value while preserving outer formatting

↑ back to top
back 

Copyright

All rights reserved © Roy Revelt 2026
All our open source packages are under MIT licenceopens in a new tab

Activities

🐛 See a bug? Raise an issueopens in a new tab
💘 Check out the Indiewebopens in a new tab and Libera manifestoopens in a new tab