Appian Community and Appian Academy are being upgraded. As a part of the upgrade, Appian Community is currently in read-only mode, and user registration is disabled until August 3. We apologize for any inconvenience this may cause, but a more secure, stable, and performant Community experience is coming soon!

The new Appian Community launches August 3, followed by Appian Academy on August 7. During the migration, Appian Community Edition, Appian Academy, Documentation, Certifications, Instructor-led Customer Training, Partner Sales Training & Accreditation, and Forum (for Appian Partners and Customers only) will remain available.

Remove a list of unwanted characters from a text string

Hi every one, 

I'm having a text string as example: 

{"Status":"Active","updatedBy":"lynn123","hasAccount":false}

What I expect to have is: 

Status: Active

updatedBy: lynn123

hasAccount: no 

I think for replacing comma with a line-break, char(10) might work, then I will substitute false with "no". But for the rest of characters {,},"", I'm not sure how to remove them all at once. I checked documentary for a!stripWith or a!reject and I think they don't work with a list of characters. 

Hope I can have some suggestions from you,

Thanks a lot!

  Discussion posts and replies are publicly visible

Parents Reply
  • I'm not sure why you are trying to convert the dictionary (fromJson()) to a string before iterating through it in a!forEach()?

    What are you expecting for a final output, is this for display/rich text field, dictionary, etc?

    a!localVariables(
      local!json: "[{""Status"":""Active"",""updatedBy"":""lynn123"",""hasAccount"":""false""}]",
      local!data: a!fromJson(local!json),
      
      a!forEach(
        items: local!data,
        expression: {
          /* process each item here */
          fv!item
        }
      )
    )

Children
No Data