I am currently returning orders from magento. Within each order there is a pair of address nodes. Each have an address type of either billing or shipping.
I want to pass the entire order but with the address nodes, if I use those fields it will pass both addresses as an array (I only want the billing).
Is there a way to filter the node in the automation itself or do I need to pass both and handle it within the action?
I didnt know if there was a way to say delete node where address_type = shipping prior to using the data in the action.
Here is an example of the data for reference.
<addresses>
<data_item>
<region>Palau</region>
<postcode>19103</postcode>
<lastname>Doe</lastname>
<street>2356 Jody Road Philadelphia, PA 19103</street>
<city>PA</city>
<telephone>610-634-1181</telephone>
<country_id>US</country_id>
<firstname>John</firstname>
<address_type>billing</address_type>
<prefix></prefix>
<middlename></middlename>
<suffix></suffix>
<company></company>
</data_item>
<data_item>
<region>Palau</region>
<postcode>19103</postcode>
<lastname>Doe</lastname>
<street>2356 Jody Road Philadelphia, PA 19103</street>
<city>PA</city>
<telephone>610-634-1181</telephone>
<country_id>US</country_id>
<firstname>John</firstname>
<address_type>shipping</address_type>
<prefix></prefix>
<middlename></middlename>
<suffix></suffix>
<company></company>
</data_item>
</addresses>
I know I can use the emit nth array element to get a single value but I am looking to emit the entire node without having to use the emit 20 times to get each value