Skip to content

Conversation

@Alaa2019-ml
Copy link

No description provided.

@crevulus crevulus self-assigned this Dec 7, 2025
.db("databaseWeek3")
.collection("bob_ross_episodes")
.updateMany({ elements: "BUSHES" }, [
{
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Your first argument to updateMany is fine, but your second argument is more complex than it needs to be. Can you find a way to simplify this? Try using the all-positional operator: https://www.mongodb.com/docs/manual/reference/operator/update/positional-all/

Copy link

@crevulus crevulus left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi Alaa,

Your code is great! I've already approved, but I have left one comment. You might want to consider making your code simpler and leveraging existing utilities and functionality provided by the mongodb package.

Copy link

@crevulus crevulus left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approved PR by mistake (instead of just changing the label) - please do not merge the code.

@Alaa2019-ml
Copy link
Author

I have edited the indes.js file. I used the all positional operator $[]. I hope it is good now. Thank you.

@Alaa2019-ml
Copy link
Author

console_Output

@Alaa2019-ml Alaa2019-ml reopened this Dec 18, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants