What does this function do? Specifically, what is the tag referring to?
function flattenImages(images, tags) {
var flattened = [];
for (const list of Object.values(images)) {
for (const element of list) {
flattened.push(Object.assign({image:element}, tags))
}
}
return flattened
}