Fixes append map bug when key matches value in existing map #1200

This commit is contained in:
Mike Farah
2022-04-28 14:45:45 +10:00
parent 26529fae94
commit 67c79b7cb1
2 changed files with 9 additions and 1 deletions
+8
View File
@@ -14,6 +14,14 @@ var addOperatorScenarios = []expressionScenario{
"D0, P[1 a], (!!int)::3\n",
},
},
{
skipDoc: true,
document: `a: key`,
expression: `. += {"key": "b"}`,
expected: []string{
"D0, P[], (!!map)::a: key\nkey: b\n",
},
},
{
skipDoc: true,
document: `[[c], [b]]`,