i have to create a custom function that clone objects despite of their types. IE. an array should be copied as an array, string as string etc.
The result of clonedObject = jQuery.extend(true, {}, object);
with arrays is an object with numerical indexes, for string is an object of characters with numerical indexes.
There is a better way to make this work than checking the type of the object and writing custom clone functions?
Thanks in advance, Mattia