Hi,
I have a table wrong JSON values, I get the values from API and for some reason they are passing incorrect JSON values/format. I'm going to mimic what I have in table below.
CREATE TABLE TestTable
(
TestTableID int pk
,TestName varchar(20)
,TestAdditionalAttributes varchar(2000)
)
INSERT INTO TestTable
VALUES ('Name1','[{"JOINING FEE":"200"},{"ADDITIONAL FEE":"100"}]'; 'Name2 ','[{"JOINING FEE":"300"},{"ADDITIONAL FEE":"50"}]'; 'Name3','[{"JOINING FEE":"250"},{"ADDITIONAL FEE":"100"}]'
The JSON above is incorrect, the correct format should be '[{"JOINING FEE":"200","ADDITIONAL FEE":"100"}]'. How do I then Update the table to remove the middle curly brackets, as an alternative (I will ask API guy to send the correct values).