DEV Community

aoguzie
aoguzie

Posted on

1

Dynamically merge all objects in different arrays (appending names instead of ignoring)

I want to combine two arrays with common properties:

var ranking = [{
    def: "0.58"
    league: "Scottish Premiership",
    name: "Celtic",
    off: "3.33",
    grank: "3",
    tform: "96.33",
},
{
    def: "2.52",
    league: "Scottish Premiership",
    name: "Dundee",
    off: "1.28",
    grank: "302",
    tform: "27.51",
}]
var matches = [{
date: "2010-04-22",
league: "Scottish

Top comments (0)

AWS Security LIVE!

Join us for AWS Security LIVE!

Discover the future of cloud security. Tune in live for trends, tips, and solutions from AWS and AWS Partners.

Learn More