bson-objectid | Construct ObjectIDs without the mongodb driver | Runtime Evironment library
kandi X-RAY | bson-objectid Summary
kandi X-RAY | bson-objectid Summary
BSON ObjectID
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of bson-objectid
bson-objectid Key Features
bson-objectid Examples and Code Snippets
Community Discussions
Trending Discussions on bson-objectid
QUESTION
Hi having trouble converting an objectID to a string in react after fetching my API... I cant get this for instance "ObjectId(5e23828631c3f20fd40d3feb)". I just need this "5e23828631c3f20fd40d3feb" here is my code:
`
...ANSWER
Answered 2020-Jan-19 at 19:51I just found a solution:
I went back to my backend server and I replace this
@Id val _id: ObjectId?
with this
@Id val _id: String = ObjectId().toHexString()
So that I'll only have the value of the objectId as an "hexString" instead of having others parameters like "machineIdentifier" or "processIdentifier"
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install bson-objectid
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page