1.0.5 • Published 7 months ago

update-mongo-db v1.0.5

Weekly downloads
-
License
ISC
Repository
-
Last release
7 months ago

My update mongoDB npm Package

Overview

update-mongo-db is an npm package for updating field names and types in MongoDB collections.

Features

  • Flexible Field Editing: You can easily edit field names and types in your MongoDB documents.
  • Data Types Supported: Update field types to boolean, string, date, and objectId.
  • Deep Nesting: The program handles updates within arrays, objects, and other nested structures.

Installation

To install update-mongo-db, run the following command:

npm install update-mongo-db 

Usage

npm run updateDB <update type> <path to field> <update value>

Example

before: { someObject:{ someArray:{ fieldName: "true", }... } }

// to change from string to boolean
npm run updateDB type collectionName.someObject.someArray.fieldName bool

// to change name of field
npm run updateDB name collectionName.someObject.someArray.fieldName newName

after: { someObject:{ someArray:{ newName: true }... } }

1.0.5

7 months ago

1.0.4

7 months ago

1.0.3

7 months ago

1.0.2

7 months ago

1.0.1

7 months ago

1.0.0

7 months ago