Open fjtello opened 5 years ago
declare @j as varchar(100); set @j = '[{ "name": "John", "skills": ["SQL", "C#", "Azure"] }, { "name": "Jane", "surname": "Doe" }]';
select @j, JSON_VALUE(@j,'$[0].name'), JSON_VALUE(@j,'$[0].skills[1]')
https://docs.microsoft.com/es-es/sql/relational-databases/json/json-data-sql-server?view=sql-server-2017
declare @j as varchar(100); set @j = '[{ "name": "John", "skills": ["SQL", "C#", "Azure"] }, { "name": "Jane", "surname": "Doe" }]';
select @j, JSON_VALUE(@j,'$[0].name'), JSON_VALUE(@j,'$[0].skills[1]')
https://docs.microsoft.com/es-es/sql/relational-databases/json/json-data-sql-server?view=sql-server-2017