Hello,
I am wondering if it is possible to group some of the output objects in a sub-element of the RESTOutput object? More specifically, I am trying to create a robot that returns detailed information about a vehicle along with a set of thumbnail URLs.
Ideally, I would like the result to be something similar to the XML snippet below:
<result>
<vehicle>
<color>black</color>
<milage>156616</milage>
<thumbnails>
<thumbnail>http://w...image1.jpg</thumbnail>
<thumbnail>http://w...image2.jpg</thumbnail>
<thumbnail>http://w...image3.jpg</thumbnail>
</thumbnails>
</vehicle>
</result>
I use extract actions to extract attributes like color, milage etc and then a For Each action to extract each thumbnail URL. My problem is that when I try my robot, the result contains several vehicle elements, each with a single thumbnail element. It looks similar to this:
<result>
<vehicle>
<color>black</color>
<milage>156616</milage>
<thumbnail>http://w...image1.jpg</thumbnail>
</vehicle>
<vehicle>
<color>black</color>
<milage>156616</milage>
<thumbnail>http://w...image2.jpg</thumbnail>
</vehicle>
<vehicle>
<color>black</color>
<milage>156616</milage>
<thumbnail>http://w...image3.jpg</thumbnail>
</vehicle>
</result>
Is it possible to make the robot add all the output added after the for each action to a sub-element (such as <thumbnails>)? Or, is there any other way I can have the set of thumbnails grouped together?
Cheers,
Emil