%dw 1.0
%namespace mes http://www.alainn.com/SOA/message/1.0
%namespace mod http://www.alainn.com/SOA/model/1.0
%output application/xml
---
mes#getItemsResponse: {
mes#PageInfo: {
pageIndex: inboundProperties."http.query.params".pageIndex,
pageSize: sizeOf payload distinctBy $.item_id
},
(payload groupBy $.item_id map {
mod#Item: {
id: $[0].item_id,
type: $[0].item_type_name,
name: $[0].item_name,
(summary: $[0].item_summary) when $[0].item_summary != null,
brand: $[0].item_brand,
images: {
($ map {
image@(type:$.image_type_name): $.url
})
}
}
})
}
Created
September 6, 2015 22:17
-
-
Save nialdarbey/94e0dd89f5d90f951062 to your computer and use it in GitHub Desktop.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment