RosettaCodeData/Task/Associative-array-Merging/DuckDB/associative-array-merging-1.duckdb

5 lines
241 B
Text
Raw Permalink Normal View History

2025-08-11 18:05:26 -07:00
set variable base= { 'name': 'Rocket Skates', 'price': 12.75, 'color':'yellow'}::JSON;
set variable update = { 'price': 15.25, 'color': 'red', 'year': 1974 }::JSON;
select json_merge_patch(getvariable('base'),getvariable('update')) as add;