IBM BPM, V8.0.1, All platforms > Authoring services in Integration Designer > Defining and transforming data > Transforming data > Transforming data using XML maps > XML mapping examples
Example: Extract a selected element of the input array to a single output
Select an element from an input array, and copy it to a single output element in the XML map editor.
Select the third rewardPoints element of type int from the input array goldStar_Client rewardPoints and copy it to a single output element frequent_flyer_points of the same type.
To extract a selected element of the input array to a single output element, follow these steps:
- Map the elements using a Move transform. The following image shows how this looks in the map editor:
business objects in the XML map editor." />
- Select element 3 by setting the cardinality of the Input array indices for the Move transform to 3. There is no option to set the cardinality of the output element, because it is a single element. To set the cardinality, follow these steps:
- Click the Move transform.
- Right click the white space in the map editor, and select Show In > Properties View.
- Click the Cardinality tab.
- Enter 3 in the Input array indices field.
Tip: The first index element has a cardinality of 1.
- Right-click the map canvas, and select Test Map to see the output of the map based on the input specified, as shown in the following image. If that goldStar_client[0] is the first index element with a cardinality of 1, and the third index element is goldStar_client[2] with a cardinality of 3: