0
0
mirror of https://github.com/PostHog/posthog.git synced 2024-11-28 00:46:45 +01:00
posthog/hogvm/__tests__/printLoops2.hog
2024-07-10 15:11:15 +02:00

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)))