Fixed to_entries[]

This commit is contained in:
Mike Farah
2023-12-12 15:44:34 +11:00
parent eff7d99e2b
commit 4cf123fed5
5 changed files with 702 additions and 639 deletions
+10
View File
@@ -5,6 +5,16 @@ import (
)
var entriesOperatorScenarios = []expressionScenario{
{
description: "to_entries splat",
skipDoc: true,
document: `{a: 1, b: 2}`,
expression: `to_entries[]`,
expected: []string{
"D0, P[0], (!!map)::key: a\nvalue: 1\n",
"D0, P[1], (!!map)::key: b\nvalue: 2\n",
},
},
{
description: "to_entries, delete key",
skipDoc: true,