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

308
Views
How can separated my ObjectID? (using mongodb especially in relationships)

enter image description hereMy ObjectID has seperated like in Command Prompt like this one

 "tchStudents" : [
            ObjectId("616450eeecf687bc5f59fac2"),
            ObjectId("61645108ecf687bc5f59fac4"),
            ObjectId("616451a8ecf687bc5f59fac8")
 ]

but if we fetch the data and display on the browser, it just like this

616450eeecf687bc5f59fac261645108ecf687bc5f59fac4616451a8ecf687bc5f59fac8

Can I use .split or .slice Thank you for helping out

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

use match with /.{1,24}/g regex

let str = "616450eeecf687bc5f59fac261645108ecf687bc5f59fac4616451a8ecf687bc5f59fac8"
let arr = str.match(/.{1,24}/g);
console.log(arr);

about 4 years ago · Juan Pablo Isaza Report
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!