I've tried to transform data from API response in Postman Flows evaluate
block using Postman FQL but unable to make it work. Here my script written in API tests
places.map(place => {
return {
id: place['id'],
dt: Object.assign({a: 1}, place['data'])
}
})
The code is straight forward, if the place data is null or missing a
, append that field to the dt
.
I am able to get the desired field in Postman evaluate but don't know how to append a
to the dt
body.{
'id':id,
'dt': data
}
How can I do it in Postman Flows' evaluate?