0
0
mirror of https://github.com/PostHog/posthog.git synced 2024-11-22 17:24:15 +01:00
posthog/hogvm/__tests__/printLoops2.hog

12 lines
312 B
Plaintext
Raw Permalink Normal View History

2024-07-10 15:11:15 +02:00
// 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)))