Skip to content Skip to sidebar Skip to footer

Merging Javascript Objects On Property

What I have is an object with three members. Each of these members has an array of objects each with new members. So accessing an 'inner' member would be done like this. outerObje

Solution 1:

So you want to change this:

var outer = {
    om1 = [
        im1_1, common_id, im1_3...
    ],
    om2 = [
        im2_1, im2_2, common_id...
    ],
    om3 = [
        common_id, im3_2, im3_3...
    ]
}

into... what exactly?

I know this isn't quite right, but I'm watching the Olympics & I need to go to bed. Maybe this can help you clarify for others.

Anyway, you need to use a loop or two :)

Post a Comment for "Merging Javascript Objects On Property"