We can find many discussions and solutions about this issue. In my case the one that worked is this code. Below you’ll find a compressed version of the extend() function (with a fix): function extend(){var r,t,n,o,e=arguments[0]||{},f=1,i=arguments.length,u=!1,y=function(r){if(null===r|| »object »!=typeof r||r.nodeType||null!==r&&r===r.window)return!1;try{if(r.constructor&&!this.hasOwnProperty.call(r.constructor.prototype, »isPrototypeOf »))return!1}catch(t){return!1}return!0};for(« boolean »==typeof e&&(u=e,e=arguments[f]||{},f++), »object »!=typeof e&& »function »!=typeof e&&(e={}),!1;i>f;f+=1)if(null!==(r=arguments[f]))for(t in r)e!==r[t]&& »undefined »==typeof e[t]&&(u&&r[t]&&(y(r[t])||(n=Array.isArray(r[t])))?(n?(n=!1,o=e[t]&&Array.isArray(e[t])?e[t]:[]):o=e[t]&&y(e[t])?e[t]:{},e[t]=extend(u,o,r[t])):void 0!==r[t]&&(e[t]=r[t]));return e} And here an example: var object_a = { value_1: ‘a’, […]