I have a simple object (or hash) in Javascript:
var settings = {
link: \'http://example.com\',
photo: \'http://photos.com/me.jpg\'
};
I nee
var clone = $.extend(true, {}, settings);
Set first argument to true.
EDIT: First argument true
signifies deep copy. For given example in original question there is no need for deep copy since there are simple immutable key-value pairs. For question in title - as a general case - use deep copy. Otherwise you get half-copy.