data_investments = data.flatMap((d) => {
return d.investments.map((investment) => ({
...investment,
investorName: d.name,
investorType: d.type,
investorHqCountry: d.hqCountry,
numInvestments: d.numInvestments,
totalInvested: d.totalInvested,
investorId: d._id,
solutionSegments: d.solutionSegments,
marketSegments: d.marketSegments
}));
})