Let’s talk Alteryx Copilot. Join the live AMA event to connect with the Alteryx team, ask questions, and hear how others are exploring what Copilot can do. Have Copilot questions? Ask here!
Start Free Trial

Alteryx Designer Desktop Discussions

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

Extracting CountryCode And CountryName from TextInput into Two columns

Masond3
8 - Asteroid

HI All, 

 

Need some Help, 

I have received a text input in the following format

 

"AR":"ARGENTINA","AM":"ARMENIA","AW":"ARUBA"",CL":"CHILE","CN":"CHINA"

 

Is there an easy way to get the above into the format below ? 

 

CountryCodeCountryName
ARARGENTINA
AMARMENIA
AWARUBA
CLCHILE
CNCHINA

 

Observations:

  • After Every Comma is a new Country Code 
  • After every Semi Colon is the countryName for the Country Code

Looking forward to your help 

 

Regards

Masond3

2 REPLIES 2
PhilipMannering
16 - Nebula
16 - Nebula

You could add braces and JSON Parse it,

PhilipMannering_0-1681814624130.png

 

ShankerV
17 - Castor

Hi @Masond3 

 

One way of doing this.

 

ShankerV_0-1681814735174.png

 

Step 1: Input

 

ShankerV_1-1681814755393.png

 

Step 2: 

 

ShankerV_2-1681814774016.png

ShankerV_3-1681814782184.png

 

 

Step 3:

ShankerV_4-1681814804810.png

 

"(\u+)":"(\u+)"(\u+)":"(\u+)

 

ShankerV_5-1681814820318.png

 

 

 

Many thanks

Shanker V

Labels
Top Solution Authors