Update JSON using JSONPATH

Hi All,

I had requirement to update the JSON value wrt key using JSONPATH.
JSON Example:
“quiz”: {
“sport”: {
“q1”: {
“question”: “Which one is correct team name in NBA?”,
“options”: [
“New York Bulls”,
“Los Angeles Kings”,
“Golden State Warriros”,
“Huston Rocket”
“answer”: “Huston Rocket”

JSONPATH: $.quiz.sport.q1

so i want to change the value of key ‘question’ to something else and update the JSON.

I’d tried deserializing the JSON and do some operation on output JSON Object, but not able to achieve.

Please help.

Hi @Vinod_Swain,

modifyJsonObject.xaml (4.8 KB) JsonText.Json (47 Bytes)

I tried to update the json key “name”. Its working for me.

Please have a look.