Operating on List Attributes

List transformers allow you to work with list attributes.

See the Attributes category in the Transformer Gallery:

Convert List Elements into Regular Attributes

You can use the ListIndexer transformer to convert elements of a structured list into full attributes, and the index can be either a number you provide directly, or one that you extract from another attribute on the feature.  

For example, if a feature has these attributes on it:

    overlaps{0}.direction  -1

    overlaps{0}.line_id    50

    overlaps{1}.direction  1

    overlaps{1}.line_id    22

    overlaps{2}.direction  1

    overlaps{2}.line_id    40

    overlaps{3}.direction  -1

    overlaps{3}.line_id    12

and it passes through a ListIndexer with an index of 2, then the feature emerges with these attributes:

    direction  1

    line_id    40

    overlaps{0}.direction  -1

    overlaps{0}.line_id    50

    overlaps{1}.direction  1

    overlaps{1}.line_id    22

    overlaps{2}.direction  1

    overlaps{2}.line_id    40

    overlaps{3}.direction  -1

    overlaps{3}.line_id    12

Note that the list itself was not changed, but the attributes at index 2 were converted from the list to become regular attributes.

Other List Operations

Examples of other list operations include:

Other Considerations

When operating on list attributes, keep in mind the following: