Skip to main content
Inspiring
Jan 28, 2024 11:25 AM UTC
Question

Remove " and [] from String

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
    Genius
    Jan 29, 2024 2:58 AM UTC
    mikes0011
    Brainy
    Jan 29, 2024 5:09 AM UTC

    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
    Jan 29, 2024 6:56 AM UTC

    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
    Jan 29, 2024 5:50 AM UTC

    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
    Jan 29, 2024 7:38 AM UTC