summaryrefslogtreecommitdiff
path: root/jstests/core/sub1.js
blob: f38c5ccc4a01e91a864e9d871bfc9ed2367049fa (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
// sub1.js

let t = db.sub1;
t.drop();

let x = {a: 1, b: {c: {d: 2}}};

t.save(x);

let y = t.findOne();

assert.eq(1, y.a);
assert.eq(2, y.b.c.d);
print(tojson(y));