Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

226
Views
How can mongodb generate unique key in embeded document

I want to add a new address to the following document

{
    username: abcd,
    password: xyz,
    addressList: {
        key1: {
            addressLine1: "12th Street",
            addressLine2: "Park Road",
            City: "Kent"
        },
        key2: {
            addressLine1: "12th Street",
            addressLine2: "Park Road",
            City: "Kent"
        }
    }
}

Can I add a new address without specifying the key and let MongoDB generate a unique one itself?

about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!