Skip to main content

Hi,

 

I have a coordinated call list, with the values below. My problem is this list: I never know the number of elements that can come into it. How can you create a dynamic method of reading this list and already create attributes, such as: latitude1, longitude1, latitude2, longitude2, latitude3, longitude3 ....

 

"coordinate" : {

"latitude" : "-23.2229628000",

"longitude" : "-35.9099781000","latitude" : "-33.2229628000",

"longitude" : "-25.9099781000","latitude" : "-33.2229628000",

"longitude" : "-15.9099781000","latitude" : "-33.2229628000",

"longitude" : "-25.9099781000"]}

 

Thank´s

Hi @mr_fme, you can use two StringSeachers and a BulkAttributeRenamer with the settings shown in the screenshot below to convert the source text to individual attributes - latitude0, latitude1, latitude2, ..., longitude0, longitude1, longitude2, .... Assuming that an attribute called "coordinate" stores the source text.

FME Workbench won't expose resulting attribute names automatically. However, if you expose the list elements in the StringSearcher manually (right-click on the list name > Expose Elements), the BulkAttributeRenamer exposes the resulting attribute names, as in:


Hi @mr_fme, you can use two StringSeachers and a BulkAttributeRenamer with the settings shown in the screenshot below to convert the source text to individual attributes - latitude0, latitude1, latitude2, ..., longitude0, longitude1, longitude2, .... Assuming that an attribute called "coordinate" stores the source text.

FME Workbench won't expose resulting attribute names automatically. However, if you expose the list elements in the StringSearcher manually (right-click on the list name > Expose Elements), the BulkAttributeRenamer exposes the resulting attribute names, as in:

Thank´s @takashi helped a lot


Reply