How to convert list hashmap into Array using Dataweave

2.5k views Asked by At

I have list as below

[{customerId="123"},{customerId="456"},{customerId="786"}]

I want to convert above as Array like below

[123,456,786]

Can you please help on how to achieve using dataweave

1

There are 1 answers

0
AnupamBhusari On

Following code will return array

%dw 1.0
%output application/java
---
payload.customerId map $ as :number

Please refer dataweave-selectors for more details.