the dataweave script i tried is throwing an error that says i have to first transform the data into an array using then concert to a json object.It’s returning null instead of the values.
INPUT:
id;email;phone;Fname;Lname
154784;[email protected];0123456789;omd;lamia
MY CODE:
%dw 2.0
output application/json
---
payload map (item, index) -> {
id: item.id,
email: item.email,
phone: item.phone,
Fname: item.Fname`
Lname: item.Lname
}
UTPUT:
[
{
“id”: null,
“email”: null,
“phone”: null,
“Fname”: null,
“Lname”: null
}
]
New contributor
Lamia OMD is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.