Substitute function string issue

i wish to replace/substitute "[", "]" with " " in string received below

""param":[{"key1":"value1","key2":"value2"}, {"key3":"value3","key4":"value4"}]"

substitute(""param":[{"key1":"value1","key2":"value2"}, {"key3":"value3","key4":"value4"}]","["," ")

substitute(""param":[{"key1":"value1","key2":"value2"}, {"key3":"value3","key4":"value4"}]","]"," ")

I am receiving the below error

Expression evaluation error at function 'substitute': Signature length (4) does not match parameter length (12)

can someone help me understand the error here.

  Discussion posts and replies are publicly visible

Parents Reply
  • 0
    Certified Lead Developer
    in reply to TejaAppian

    your input string still isn't formatted properly.  the proper way to create double-quotes inside an Appian string is to put 2 sets of double quotes.  this added to needing single-quotes surrounding your string.  it gets pretty confusing.  you might try inserting your desired string value as the "value" portion of an input parameter and seeing what happens then.

    as far as i can tell, this should work:

    local!string: """param"":[{""key1"":""value1"",""key2"":""value2""}, {""key3"":""value3"",""key4"":""value4""}]"

Children