# How to the get the _id property of a freshly inserted MongoDB entry

> Node's mongo driver appends the returned _id field to the original object reference. A short Today I Learned note from the Graffino team.

- URL: https://graffino.com/til/how-to-the-get-the-id-property-of-a-freshly-inserted-mongodb-entry
- Author: Nick Ciolpan
- Channel: javascript
- Published: 2022-11-15
- Updated: 2022-11-15

Node's mongo driver appends the returned ```_id``` field to the original object reference.

```
myCollection.insert(myObject, () => { 
	const {_id } = myObject
  return _id;
})

```
