mirror of
https://github.com/mikefarah/yq.git
synced 2026-09-01 14:14:52 +08:00
Fixed to_entries[]
This commit is contained in:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user