summaryrefslogtreecommitdiff
path: root/jstests/core/sub1.js
blob: d42677f32662ad96dd31815f501f5954bc66099d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
// 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));