Skip to main content

Bug Tracker

Side navigation

#5000 closed feature (worksforme)

Opened August 01, 2009 02:18PM UTC

Closed August 02, 2009 07:53PM UTC

Add Join Object to Core

Reported by: zRing Owned by:
Priority: major Milestone: 1.4
Component: core Version: 1.3.2
Keywords: join, objects, core Cc:
Blocked by: Blocking:
Description

It would be cool if a function like:

function joinObjs()

{

var newObj = {};

for(var i = 0;i < arguments.length; i++)

{

if(typeof(arguments[i]) == "object")

{

for(key in arguments[i])

{

newObj[key] = arguments[i][key];

}

}

}

return newObj;

}

was added to the core of jQuery. I find myself needing to join objects all the time, and it would be useful if it was added to jQuery.

Attachments (0)
Change History (3)

Changed August 01, 2009 03:06PM UTC by cloudream comment:1

Changed August 01, 2009 03:07PM UTC by cloudream comment:2

Changed August 02, 2009 07:53PM UTC by dmethvin comment:3

resolution: → worksforme
status: newclosed

Yeah, this sounds exactly like jQuery.extend. Check it out.