summaryrefslogtreecommitdiff
path: root/jstests/sub1.js
diff options
context:
space:
mode:
Diffstat (limited to 'jstests/sub1.js')
-rw-r--r--jstests/sub1.js14
1 files changed, 14 insertions, 0 deletions
diff --git a/jstests/sub1.js b/jstests/sub1.js
new file mode 100644
index 00000000000..9e643f811fd
--- /dev/null
+++ b/jstests/sub1.js
@@ -0,0 +1,14 @@
+// sub1.js
+
+t = db.sub1;
+t.drop();
+
+x = { a : 1 , b : { c : { d : 2 } } }
+
+t.save( x );
+
+y = t.findOne();
+
+assert.eq( 1 , y.a );
+assert.eq( 2 , y.b.c.d );
+print( tojson( y ) );