Insert Square Brackets
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Hello,
I am dealing with json output file for which I need to add these square bracket to. Down below i have shown how Name can have different values and how the outcome should look like. Please advise, thank you.
Data1
"Name": "AAA","BBB","CCC"
Expected Outcome1
"Name": ["AAA","BBB","CCC"]
Data 2
"Name":""
Expected Outcome2
"Name": []
Data 3
"Name":"HHH"
Expected Outcome3
"Name": ["HHH"]
Solved! Go to Solution.
- Labels:
- Common Use Cases
- Workflow
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Hey @jakaur32,
Here is a simple way to do this with a formula tool:
Any questions or issues please ask :)
HTH!
Ira
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Hi Ira,
Quick question...what if my input is AAA and i need it to be like ["AAA"] then what do i do.
or input is BBB,CCC,DDD and expected output is ["BBB" , "CCC" , "DDD"]
thank you.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Hi @jakaur32!
If you have different string formats coming in, you will need to write conditional statements for each type of record. If there are not too many different string formats, then you can build the logic into the one formula tool as @IraWatt recommended.
Even though it is more tools, I sort of lean towards a solution like this because it is dynamic to many different expected strings of data.
In the concatenation function of the Summarize tool, you have the option to add a start, separator, and end characters:
Hope this helps!
Deb
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
thank you so much
