AWS documentdb documentation change
Summary
Entire documentation page for the $isArray operator was removed, including all content, examples, and code samples
Security assessment
This change appears to be a complete removal of documentation for the $isArray operator. There is no evidence in the diff that this removal is related to a security vulnerability or weakness. The removed content includes standard operator documentation, examples, and code samples without any security warnings or vulnerability disclosures. This appears to be routine documentation maintenance or reorganization rather than a security-related change.
Diff
diff --git a/documentdb/latest/developerguide/isArray.md b/documentdb/latest/developerguide/isArray.md index 78a6c5871..8b1378917 100644 --- a//documentdb/latest/developerguide/isArray.md +++ b//documentdb/latest/developerguide/isArray.md @@ -1 +0,0 @@ -[](/pdfs/documentdb/latest/developerguide/developerguide.pdf#isArray "Open PDF") @@ -3,159 +1,0 @@ -[Documentation](/index.html)[Amazon DocumentDB](/documentdb/index.html)[Developer Guide](what-is.html) - -Example (MongoDB Shell)Code examples - -# $isArray - -The `$isArray` operator in Amazon DocumentDB is used to check if a field in a document is an array. This operator can be useful in aggregation pipelines and conditional expressions to handle array-type fields. - -**Parameters** - - * `field`: The field path to check if it is an array. - - - - -## Example (MongoDB Shell) - -This example demonstrates how to use the `$isArray` operator to identify documents where the "inventory" field is an array. - -**Create sample documents** - - - db.videos.insertMany([ - { "_id":1, "name":"Live Soft", "inventory": {"Des Moines": 1000, "Ames" : 500}}, - { "_id":2, "name":"Top Pilot", "inventory": {"Mason City": 250, "Des Moines": 1000}}, - { "_id":3, "name":"Romancing the Rock", "inventory": {"Mason City": 250, "Ames" : 500}}, - { "_id":4, "name":"Bravemind", "inventory": [{"location": "Mason City", "count": 250}, {"location": "Des Moines", "count": 1000}, {"location": "Ames", "count": 500}]} - ]); - -**Query example** - - - db.videos.aggregate([ - { - $match: { - $isArray: "$inventory" - } - }, - { - $project: { - _id: 1, - name: 1, - "inventory.location": 1, - "inventory.count": 1 - } - } - ]).pretty(); - -**Output** - - - { - "_id": 4, - "name": "Bravemind", - "inventory": [ - { - "location": "Mason City", - "count": 250 - }, - { - "location": "Des Moines", - "count": 1000 - }, - { - "location": "Ames", - "count": 500 - } - ] - } - -## Code examples - -To view a code example for using the `$isArray` command, choose the tab for the language that you want to use: - -Node.js - - - - const { MongoClient } = require('mongodb'); - - async function run() { - const client = await MongoClient.connect('mongodb://<username>:<password>@<cluster-endpoint>:27017/?tls=true&tlsCAFile=global-bundle.pem&replicaSet=rs0&readPreference=secondaryPreferred&retryWrites=false'); - const db = client.db('test'); - const collection = db.collection('videos'); - - const result = await collection.aggregate([ - { - $match: { - $isArray: '$inventory' - } - }, - { - $project: { - _id: 1, - name: 1, - "inventory.location": 1, - "inventory.count": 1 - } - } - ]).toArray(); - - console.log(result); - - await client.close(); - } - - run(); - -Python - - - - from pymongo import MongoClient - - client = MongoClient('mongodb://<username>:<password>@<cluster-endpoint>:27017/?tls=true&tlsCAFile=global-bundle.pem&replicaSet=rs0&readPreference=secondaryPreferred&retryWrites=false') - db = client['test'] - collection = db['videos'] - - result = list(collection.aggregate([ - { - '$match': { - '$isArray': '$inventory' - } - }, - { - '$project': { - '_id': 1, - 'name': 1, - 'inventory.location': 1, - 'inventory.count': 1 - } - } - ])) - - print(result) - - client.close() - - **Javascript is disabled or is unavailable in your browser.** - -To use the Amazon Web Services Documentation, Javascript must be enabled. Please refer to your browser's Help pages for instructions. - -[Document Conventions](/general/latest/gr/docconventions.html) - -$indexStats - -$isoDayOfWeek - -Did this page help you? - Yes - -Thanks for letting us know we're doing a good job! - -If you've got a moment, please tell us what we did right so we can do more of it. - -Did this page help you? - No - -Thanks for letting us know this page needs work. We're sorry we let you down. - -If you've got a moment, please tell us how we can make the documentation better.