I currently have javascript which iteratively runs an api query for each value (item.data_ipm_monitor_uuid) in an array I specified.
This works perfectly.
const arr = sql_prod_se.data //your array of things to iterate over
const query = API_RS_PagespeedJS // your query to trigger for each
const promises = arr.map((item) => {
return query.trigger({
additionalScope: {
ph: item.data_ipm_monitor_uuid
}
});
});
return Promise.all(promises)
This produces this output...
However, I would like to insert the value (item.data_ipm_monitor_uuid) into the results array (perhaps just above or below the message: "Reading results was successful" - or even in place of) so I know which uuid the API results belong to.
I guess what I am asking is what does the site_uuid look like in the transformer. Is it only one site_uuid or multiple? Will it be the same amount of site_uuids as the the number of keys in your array you want to add to?