Allow . as {$a:$b} destructuring

This commit is contained in:
Nicolas Williams committed 2017-03-26 05:36:23 -05:00
1 parent 38bfec1594
commit 7935d307f0
3 files changed
+611 -594

No files matched your search

+4
View File
@@ -720,6 +720,10 @@ null
{"a":1, "b":[2,{"d":3}]}
[1,2,3]
. as {$a, $b:[$c, $d]}| [$a, $b, $c, $d]
{"a":1, "b":[2,{"d":3}]}
[1,[2,{"d":3}],2,{"d":3}]
# Destructuring with alternation
.[] | . as {$a, b: [$c, {$d}]} ?// [$a, {$b}, $e] ?// $f | [$a, $b, $c, $d, $e, $f]
[{"a":1, "b":[2,{"d":3}]}, [4, {"b":5, "c":6}, 7, 8, 9], "foo"]