I am trying to merge 2 sets of Object & Array like below
{
exclude: ['placeholder'],
attributes: { MYID : '' }
map: 'input'
}
AND
{
exclude: ['options'],
attributes: { class: '', id:'', name:'', },
map: '',
}
I tried using jQuery's $.extend function it worked but it only merge objects.
And also tried with lodash js which also dose not work.
I get output as
{
exclude: ['options'],
attributes: { class: '', id: '', name: '', MYID: '' },
map: '',
}
I need output like
{
exclude: ['options','placeholder'],
attributes: { class: '', id: '', name: '', MYID: '' },
map: '',
}
Code I tried using
$.extend(true,{
exclude: ['placeholder'],
attributes: { MYID : '' }
map: 'input'
},{
exclude: ['options'],
attributes: { class: '', id:'', name:'', },
map: '',
});