Skip to content

Instantly share code, notes, and snippets.

@dalizard
Created May 16, 2011 18:59
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dalizard/975069 to your computer and use it in GitHub Desktop.
Save dalizard/975069 to your computer and use it in GitHub Desktop.
> // v1.8+ shell
> x
{
"_id" : ObjectId("4dcd3ebc9278000000005158"),
"d" : ISODate("2011-05-13T14:22:46.777Z"),
"b" : BinData(0,""),
"c" : "aa",
"n" : 3,
"e" : [ ],
"n2" : NumberLong(33)
}
> x.d instanceof Date
true
> x.b instanceof BinData
true
> typeof x
object
> typeof x.b
object
> typeof x.n
number
> typeof x.n
number
> typeof x.n2
object
> x.n2 instanceof NumberLong
true
> typeof x.c
string
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment