我的表中有一列JSON字符串,我正在使用SQL Server 2008. 任何有关如何解析JSON字符串并提取特定值的想法?解析SQL中的JSON字符串
这里是我的JSON字符串:
{"id":1234,"name":"Lasagne al frono","description":"Placerat nisi turpis, dictumst nasceture ete etiam mus nec cum platea tempori zillest. Nisi niglue, augue adipiscing ete dignissim sed mauris augue, eros!","image":"images/EmptyProduct.jpg","cartImage":"images/ArabianCoffee.jpg","basePrice":54.99,"priceAttribute":"itemPrice","attributes":[{"type":"Addons","label":"Side","attributeName":"Side","display":"Small","lookupId":8},{"type":"Addons","label":"Drink","attributeName":"drink","display":"Small","lookupId":5},{"label":"add note","type":"Text","attributeName":"notes","display":"Wide","lookupId":null}]}
我需要提取 “名” 的价值,任何帮助吗?
几乎DUP的[解析JSON在TSQL](http://stackoverflow.com/q/2867501/1178314),它与一个参数要求作为源而不是列,但有很好的答案,现在在SQL Server 2016中提到了本机JSON支持。 –