My FeedDiscussionsHeadless CMS
New
Sign in
Log inSign up
Learn more about Hashnode Headless CMSHashnode Headless CMS
Collaborate seamlessly with Hashnode Headless CMS for Enterprise.
Upgrade ✨Learn more
How to chronologically remap three different arrays into one array?

How to chronologically remap three different arrays into one array?

Madiba Razak's photo
Madiba Razak
·Feb 8, 2016

Hi , I am developing a timeline feed system using parse cloud. I need to map three different results into one file based on the upload date. The following is the array structure.

var firstArrayFromPromise = [
    {"uploadedAt ": date, "data" : {object} },
    {"uploadedAt"  : date    , "data" :{object} }
]

var secondArrayFromPromise = [
        {"uploadedAt ": date, "data" : {object} },
        {"uploadedAt"  : date    , "data" :{object} }
    ]

What's the most efficient approach to achieve this? Any help will be highly appreciated.