add a test for update-assignment with overlapping paths into nested objects
This commit is contained in:
1 parent
1c66c26e03
commit
36684e920c
1 file changed
+8
@@ -5510,6 +5510,14 @@
|
|||||||
expected: |
|
expected: |
|
||||||
{"a":{"p":{"b":{"p":1,"q":1},"z":{"p":null,"q":null}},"q":{"b":{"p":1,"q":1}}}}
|
{"a":{"p":{"b":{"p":1,"q":1},"z":{"p":null,"q":null}},"q":{"b":{"p":1,"q":1}}}}
|
||||||
|
|
||||||
|
- name: update-assignment operator against nested object with overlapping paths
|
||||||
|
args:
|
||||||
|
- -c
|
||||||
|
- '(.a.b.c,.a,.a.p.b.z) |= {p: ., q: .}'
|
||||||
|
input: '{"a":{"b":{"c":1}}}'
|
||||||
|
expected: |
|
||||||
|
{"a":{"p":{"b":{"c":{"p":1,"q":1},"z":{"p":null,"q":null}}},"q":{"b":{"c":{"p":1,"q":1}}}}}
|
||||||
|
|
||||||
- name: update-assignment operator with optional operator
|
- name: update-assignment operator with optional operator
|
||||||
args:
|
args:
|
||||||
- -c
|
- -c
|
||||||
|
|||||||
Reference in new issue
Block a user