// I have a collection of various objects
_id: "5e5d00337c5e6a0444d00304"
orderID: 10355
orderDate: "2020-03-02"
user:
_id: "5e2e9699a648c53154f41025"
name: "xyz1"
email: "<a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="08696a6b6c6d486f65696164266b6765">[email protected]</a>"
mNumber: 12336
// and I need to consolidate this into a single array
orderID: 10354, 10355
orderDate:"2020-03-02","2020-03-02"
name: "xyz", "xyz1"
email: "<a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="79181b1a1d391e14181015571a1614">[email protected]</a>", "<a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="b2d3d0d1d6d7f2d5dfd3dbde9cd1dddf">[email protected]</a>"
mNumber: 1234536, 12336
My goal is to export this data to an Excel sheet with headers for id, name, email, and more like so:
orderID orderDate name email mNumber
10354 2020-03-02 xyz <a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="e9888b8a8da98e84888085c78a8684">[email protected]</a> 1234536
10355 2020-03-02 xyz1 <a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="11707372757451767c70787d3f727e7c">[email protected]</a> 12336
How can this be achieved in Angular?