I use SQL Server and I need to move "setting0" and "setting1" from one JSON value into a new JSON value in a new record;
Here is the table structure:
userId | setting type | settings
-------+--------------+-----------------------------------------------
id0 | type0 | {"setting0": 0, "setting1": 1, "setting2": 2, "...", "setting100": 100}
and I need to get this result:
userId | setting type | settings
-------+--------------+---------------------------------
id0 | type0 | {"setting2": 2, "...", "setting100": 100}
id0 | type1 | {"setting0": 0, "setting1": 1}
Update:
There are a lot of settings in JSON value with type0 and due to business logic I need to separate only setting0 and setting1 from type0 and move it to type1.
Many thanks in advance