Hi Team,
Could some one help me, Where ever val – value is there double quote we need to replace by space as like below.
I.e. "val":"CAPS","CS","OPG","WDG","variableName" should be "val":"CAPS CS OPG WDG","variableName"
In the below input jsondata
declare @JsonDatanvarchar(max)='{"body":[{"createdName":"Justen Ducette","status":"A","resourceBundleId":1223,"id":10011,"notificationId":1232321312,"phaseTemplate":{"templateId":123123213,"templateName":"MC | Severity 2 or 3 | Communication (CRM)","name":"Initial","messageFlag":1,"contactsFlag":3,"settingsFlag":1,"phaseDefinitions":[{"id":1001,"status":"A","isDefault":false,"name":"New","seq":0}],"formTemplate":{"subject":"Severity 2 | Initial | Xbox Live Service, Xbox.com, MSStore (Microsoft Store Online), & Office Redemption & Activation Services | CAPS, CS, OPG, WDG | INC20527749","preMessage":"not applicable (this message is email enabled only)","formVariableItems":[{"val":"Live Service, Xbox.com, MSStore ( Store Online), & Office Redemption & Activation Services","variableName":"Application","isRequired":true,"seq":1,"variableId":1221,"prefixName":"1"},{"val":"CAwPS","CS","OPG","WDG","variableName":"SBU Impacted","isRequired":true,"seq":2,"variableId":8110002061446243,"prefixName":"1"},{"val":"123123","variableName":"TicketID","isRequired":true,"seq":3,"variableId":8114400107957104,"prefixName":"1"},{"val":"Customers Unable to Complete Purchases Across All Storefronts","variableName":"Title of Severity Notification","isRequired":true,"seq":4,"variableId":8110002061446241,"prefixName":"1"},{"val":"10-23-2018 at 11:39:00","variableName":"Incident Start Time","isRequired":true,"seq":5,"variableId":8110002061446252,"prefixName":"1"},{"val":"PDT","variableName":"Time Zone","isRequired":true,"seq":6,"variableId":8110002061446251},{"val":"Agents are able to assist customers with their purchasing issues through normal troubleshooting, but may see a spike in reports from customers.","variableName":"Agent Experience (MC-CRM)","isRequired":true,"seq":7,"variableId":8114400107957650,"prefixName":"1"},{"val":"All sites and agents that support these applications would potentially see impact. Mission Control has not received any reports from sites receiving increased volume related to this issue.","variableName":"Sites/Agents Impacted (MC/CRM)","isRequired":true,"seq":8,"variableId":8114400107957651,"prefixName":"1"},{"val":"No agent workaround has been communicated for this event.","variableName":"Agent Workaround (MC-CRM)","isRequired":true,"seq":9,"variableId":8114400107957652},{"val":"One Store Operations Center (OSOC)","variableName":"Fix Team - MC","isRequired":true,"seq":10,"variableId":8110002061446337,"prefixName":"1"},{"val":"Support spun up a bridge call with the respective engineering groups working to identify the root cause. Support found that the datacenter is throwing errors, seeing that API calls to the Payments Service failing with HTTP 5xx errors.","variableName":"Status Update (MC-CRM)","isRequired":true,"seq":11,"variableId":8114400107957653,"prefixName":"1"},{"val":"Multiple","variableName":"LOB Impacted","isRequired":true,"seq":12,"variableId":8114400107957659,"prefixName":"1"},{"val":"Global","variableName":"Regions Impacted (MC-CRM)","isRequired":true,"seq":13,"variableId":8114400107957655,"prefixName":"1"},{"val":"Some customers receiving errors when purchasing, or managing their payment instruments across all Commerce Storefronts receiving a generic error message.","variableName":"Customer Experience (MC-CRM)","isRequired":true,"seq":14,"variableId":8114400107957656,"prefixName":"1"},{"val":"15 unique user failures being thrown per minute.","variableName":"# of Customers Impacted (MCCRM","isRequired":true,"seq":15,"variableId":8114400107957657,"prefixName":"1"},{"val":"Customers attempting to retry their actions would be successful.","variableName":"Customer Workaround (MC-CRM)","isRequired":true,"seq":16,"variableId":8114400107957658,"prefixName":"1"},{"val":"Justen Ducette","variableName":"MajorIncidentManager","isRequired":true,"seq":17,"variableId":8114400107957109,"prefixName":"1"},{"val":"10-23-2018 at 14:15:00","variableName":"MC-ReportedTime","isRequired":true,"seq":18,"variableId":8110002061449219,"prefixName":"1"},{"val":"2","variableName":"Severity 2 or 3","isRequired":true,"seq":19,"variableId":8096807921913212,"prefixName":"1"},{"val":"MC_CAPS_S2","variableName":"MC-SevDG1","isRequired":true,"seq":20,"variableId":8110002061448463,"prefixName":"1"},{"val":"MC_CS_S2,","variableName":"MC-SevDG2","isRequired":false,"seq":21,"variableId":8110002061448468,"prefixName":"1"},{"val":"MC_OPG_S2,","variableName":"MC-SevDG3","isRequired":false,"seq":22,"variableId":8110002061448469,"prefixName":"1"},{"val":"MC_WDG_S2,","variableName":"MC-SevDG4","isRequired":false,"seq":23,"variableId":8110002061448470,"prefixName":"1"},{"val":"MC_Xbox_S2","variableName":"MC-SevDG5","isRequired":false,"seq":24,"variableId":8110002061448471,"prefixName":"1"},{"variableName":"MC-SevDG6","isRequired":false,"seq":25,"variableId":8110002061448472},{"variableName":"MC-SevDG7","isRequired":false,"seq":26,"variableId":8110002061448473},{"variableName":"MC-SevDG8","isRequired":false,"seq":27,"variableId":8110002061448474}]},"ignoreVariable":true,"evaluateAll":false},"name":"New","lastModifiedDate":1540330199031,"lastModifiedId":8096807921918046,"createdId":8096807921918046,"createdDate":1540330199031,"lastModifiedName":"Justen Ducette","phaseDefinition":{"phaseNodeType":"Begin","id":1001,"incidentStatus":"Open","status":"A","isDefault":true,"name":"New","seq":100}},{"createdName":"Jason Ivanosich","status":"A","resourceBundleId":8105604014933564,"id":10031,"notificationId":8101205968979761,"phaseTemplate":{"templateId":8114400107958030,"templateName":"MC | Severity 2 or 3 | Communication (CRM)","name":"Resolution","messageFlag":1,"contactsFlag":3,"settingsFlag":1,"phaseDefinitions":[{"id":1003,"status":"A","isDefault":false,"name":"Closed","seq":0}],"formTemplate":{"subject":"Resolution Notice | Severity 2 | Xbox Live Service, Xbox.com, MSStore (Microsoft Store Online), & Office Redemption & Activation Services | CAPS, CS, OPG, WDG | INC20527749","preMessage":"not applicable (this message is email enabled only)","formVariableItems":[{"val":"Xbox Live Service, Xbox.com, MSStore (Microsoft Store Online), & Office Redemption & Activation Services","variableName":"Application","isRequired":true,"seq":1,"variableId":8096807921912758},{"val":"CAPS","CS","OPG","WDG","variableName":"SBU Impacted","isRequired":true,"seq":2,"variableId":8110002061446243},{"val":"s123123123","variableName":"TicketID","isRequired":true,"seq":3,"variableId":8114400107957104},{"val":"Customers Unable to Complete Purchases Across All Storefronts","variableName":"Title of Severity Notification","isRequired":true,"seq":4,"variableId":8110002061446241},{"val":"10-23-2018 at 11:39:00","variableName":"Incident Start Time","isRequired":true,"seq":5,"variableId":8110002061446252},{"val":"PDT","variableName":"Time Zone","isRequired":true,"seq":6,"variableId":8110002061446251},{"val":"Agents are able to assist customers with their purchasing issues through normal troubleshooting, but may see a spike in reports from customers.","variableName":"Agent Experience (MC-CRM)","isRequired":true,"seq":7,"variableId":8114400107957650},{"val":"All sites and agents that support these applications would potentially see impact. Mission Control has not received any reports from sites receiving increased volume related to this issue.","variableName":"Sites/Agents Impacted (MC/CRM)","isRequired":true,"seq":8,"variableId":8114400107957651},{"val":"No agent workaround has been communicated for this event.","variableName":"Agent Workaround (MC-CRM)","isRequired":true,"seq":9,"variableId":8114400107957652},{"val":"One Store Operations Center (OSOC)","variableName":"Fix Team - MC","isRequired":true,"seq":10,"variableId":8110002061446337},{"val":"Engineering teams successfully failed over traffic and reset IIS to fix this issue.","variableName":"Status Update (MC-CRM)","isRequired":true,"seq":11,"variableId":8114400107957653,"prefixName":"UPDATED -"},{"val":"Multiple","variableName":"LOB Impacted","isRequired":true,"seq":12,"variableId":8114400107957659},{"val":"Global","variableName":"Regions Impacted (MC-CRM)","isRequired":true,"seq":13,"variableId":8114400107957655},{"val":"Some customers receiving errors when purchasing, or managing their payment instruments across all Commerce Storefronts receiving a generic error message.","variableName":"Customer Experience (MC-CRM)","isRequired":true,"seq":14,"variableId":8114400107957656},{"val":"15 unique user failures being thrown per minute.","variableName":"# of Customers Impacted (MCCRM","isRequired":true,"seq":15,"variableId":8114400107957657},{"val":"Customers attempting to retry their actions would be successful.","variableName":"Customer Workaround (MC-CRM)","isRequired":true,"seq":16,"variableId":8114400107957658},{"val":"Jason Ivanosich","variableName":"MajorIncidentManager","isRequired":true,"seq":17,"variableId":8114400107957109,"prefixName":"UPDATED -"},{"val":"Resolution","variableName":"Resolution(MC-CRM)","isRequired":false,"seq":18,"variableId":8096807921915496,"prefixName":"1"},{"val":"2","variableName":"Severity 2 or 3","isRequired":true,"seq":19,"variableId":8096807921913212},{"val":"MC_CAPS_S2","variableName":"MC-SevDG1","isRequired":true,"seq":20,"variableId":8110002061448463},{"val":"MC_CS_S2,","variableName":"MC-SevDG2","isRequired":false,"seq":21,"variableId":8110002061448468},{"val":"MC_OPG_S2,","variableName":"MC-SevDG3","isRequired":false,"seq":22,"variableId":8110002061448469},{"val":"MC_WDG_S2,","variableName":"MC-SevDG4","isRequired":false,"seq":23,"variableId":8110002061448470},{"val":"MC_Xbox_S2","variableName":"MC-SevDG5","isRequired":false,"seq":24,"variableId":8110002061448471},{"variableName":"MC-SevDG6","isRequired":false,"seq":25,"variableId":8110002061448472},{"variableName":"MC-SevDG7","isRequired":false,"seq":26,"variableId":8110002061448473},{"variableName":"MC-SevDG8","isRequired":false,"seq":27,"variableId":8110002061448474},{"val":"10-23-2018 at 14:15:00","variableName":"MC-ReportedTime","isRequired":true,"seq":28,"variableId":8110002061449219}]},"ignoreVariable":true,"evaluateAll":false},"name":"Close","lastModifiedDate":1540331481832,"lastModifiedId":8114400107962948,"createdId":8114400107962948,"createdDate":1540331481832,"lastModifiedName":"Jason Ivanosich","phaseDefinition":{"phaseNodeType":"End","id":1003,"incidentStatus":"Closed","status":"A","isDefault":false,"name":"Close","seq":300}}]}'
Thanks & Regards,
VJ
VJ