Skip to main content
Inspiring
January 28, 2024
Question

Remove " and [] from String

  • January 28, 2024
  • 5 replies
  • 5 views

Hi All,

I have string containing items, such as ["var1","var2"] and there might be more than two items, I want to extract these values without double quotation marks " and square brackets [ ] , the result should be like var1,var2 

are there any functions that could help me achieve this?

    5 replies

    mathieud0001
    Brainy
    January 29, 2024
    mikes0011
    Brainy
    January 29, 2024

    Are you sure that's not a JSON string?  If so, you should use supported functionality to just convert it back from JSON to an array.

    The Expression Guru
    harshitb6843
    Brainy
    January 29, 2024

    If you are getting this String as a response from one of your integrations, I will advise you to look for this option in your integration - 

    konduruc733182
    Inspiring
    January 29, 2024

    Hello [mention:bca0992588074b3b9d61ed5bf520bd26:e9ed411860ed4f2ba0265705b8793d05] 

    Assuming that this is JSON format. as Mike mentioned you can try using the supported functionality.

    [quote userid="264401" url="~/discussions/f/user-interface/32911/remove-and-from-string"]["var1","var2"][/quote]

    Check out this example on how it would work a!fromJson() Function (Example)

    stefanhelzle0001
    Brainy
    January 29, 2024