for (const template of instrumentTemplates) {
const { instrumentTypeId, name, instrumentTemplate } = template;
for (const instrument of instruments.data) {
if (instrument.instrumentTypeId === instrumentTypeId) {
instrumentsWithTemplate.push({ ...instrument, instrumentTemplate, instrumentType: name });
}
}
}
for (const template of instrumentTemplates) {
const { instrumentTypeId, name, instrumentTemplate } = template;
for (const instrument of instruments.data) {
if (instrument.instrumentTypeId === instrumentTypeId) {
instrumentsWithTemplate.push({ ...instrument, instrumentTemplate, instrumentType: name });
}
}
}