mirror of
https://github.com/PostHog/posthog.git
synced 2024-12-01 04:12:23 +01:00
12 lines
312 B
Plaintext
12 lines
312 B
Plaintext
// Printing recursive objects.
|
|
let root := {'key': 'value', 'key2': 'value2'}
|
|
let leaf := {'key': 'value', 'key2': 'value2'}
|
|
for (let i := 0; i < 30; i := i + 1) {
|
|
root[f'key_{i}'] := {
|
|
'something': leaf,
|
|
}
|
|
}
|
|
// Should NOT replace all leaves with nulls.
|
|
print(root)
|
|
print(jsonParse(jsonStringify(root)))
|