By using db<>fiddle, you agree to license everything you submit by Creative Commons CC0.
DECLARE @Content varchar(500) = '{
"File":[
{
"ID":1,
"Fragment":"Frag1"
},
{
"ID":2,
"Fragment":"Frag2"
},
{
"ID":3,
"Fragment":"Frag3"
}]
}';
SELECT COUNT(*)
FROM OPENJSON(@Content, N'$.File')
(No column name) |
---|
3 |