Skip to content
Justice Tech School

BSON Types

MongoDB stores BSON with types like String, Int32, Double, Date and ObjectId.

Example
db.items.insertOne({
  name: "x",
  qty: NumberInt(5),
  price: 9.99,
  added: new Date(),
  ok: true
})

Exercise

Date type.

new ()

Quiz Test

What is BSON?

These free lessons are for learning. Join a full course for projects, mentor feedback and a verified certificate.