Skip to main content
Solved

Convert attribute values into an array

  • January 16, 2026
  • 2 replies
  • 53 views

fmeuser_gc
Contributor
Forum|alt.badge.img+11

I’m trying to convert those attribute values whichever has comma into an array.

Attribute A has values - "ABC" and "ABC","DEF" and "ABC","DEF","GHI".

Desired output -

“ABC”

["ABC", "DEF"]

["ABC", "DEF",”GHI”]

Any inputs are appreciated. Thanks very much!

Tagging ​@danilo_fme , ​@david_r 

Best answer by daveatsafe

Hi ​@fmeuser_gc,

Please use a Tester to test if Attribute A contains a comma. Route the Passed output to a StringConcatenator to add the square brackets to the beginning and end of the attribute value.

You could also do the same operation using a conditional operation in an AttributeManager:

 

2 replies

daveatsafe
Safer
Forum|alt.badge.img+21
  • Safer
  • Best Answer
  • January 16, 2026

Hi ​@fmeuser_gc,

Please use a Tester to test if Attribute A contains a comma. Route the Passed output to a StringConcatenator to add the square brackets to the beginning and end of the attribute value.

You could also do the same operation using a conditional operation in an AttributeManager:

 


hkingsbury
Celebrity
Forum|alt.badge.img+67
  • Celebrity
  • January 18, 2026

@daveatsafes answer will give you a string formatted like you requested.

 

If you’re looking to convert it into a List (FMEs ‘equivalent’ to an array) the steps would be:

  1. StringReplacer - replace “ with nothing (leave the replace field empty)
  2. AttributeSplitter - set the delimiter to ,
  3. The output will be one feature for each input, with a List containing one item for each of those in the input string