Advent of Code is back! Unwrap daily challenges to sharpen your Alteryx skills and earn badges along the way! Learn more now.

Alteryx Designer Desktop Discussions

Find answers, ask questions, and share expertise about Alteryx Designer Desktop and Intelligence Suite.
SOLVED

how do I remove " from string?

DFstr
7 - Meteor

"Hi, I need help with editing a text. I want to remove quotation marks from some numbers, but not from other parts. Here's an example of what I have:

 

"type": "text", "id": "761", "formId": "2052", "label": "mail",

 

And here's what I want it to look like:

 

"type": "text", "id": 761, "formId": 2052, "label": "mail

 

Using replace characher tool is not an option, hence I was trying to replace :

"id": " with  "id": 

", "formId": " with ", "formId": 

, "label" with , label"

 

 

 I tried to use following method: :

  • Replace "id": " with "id":
  • Replace ", "formId": " with ", "formId":
  • Replace , "label" with , label

But when I use Replace([JSON_ValueString], """id": """, ""id": "), I am getting error message ("malformed statemet "

"

 

Replace([JSON_ValueString], """id": """, ""id": ") - is malformed statemet 

 

How can I do this without errors?

 

Thanks!

5 REPLIES 5
TimN
13 - Pulsar
gautiergodard
13 - Pulsar

Hello @DFstr 

Please see solution attached, using regex.

 

 
DFstr
7 - Meteor

this won´t do the job, as I have another spots where I need to have number between double quotes. E.g. "imageChoices_showLabels": "1", needs to stay as it is

 

gautiergodard
13 - Pulsar

No problem @DFstr , here is another way to do it!

 

Please mark this post as solution if it solved your problem!

DFstr
7 - Meteor

Thanks!

Labels