我想更新JSON数组中的现有JSON值。我可以使用将新的JSON附加到JSON数组JSON_MODIFY。假设我有一个类似JSON:
[{"id":"101","name":"John"}, {"id":"102","name":"peter"}]
Run Code Online (Sandbox Code Playgroud)
但是我只想更新id = 102的json。
有可能使用JSON_MODIFY()吗?
编辑:
实际数据
{"Details":{"SId":{"Type":"string","Value":"1234"},"BookList":{"Type":"List","Value":[{"id": "101", "name": "Book1"},{"id": "102", "name": "Book2"}]},"SName":{"Type":"string","Value":"john"}}}
Run Code Online (Sandbox Code Playgroud)