I got two array here:
let arr1 = [
{
sockets: 0,
implicitMods: [
'+2 to Level of Socketed AoE Gems',
'+2 to Level of Socketed Trap or Mine Gems'
],
explicitMods: [], // arr2[0] in here
},
{
sockets: 3,
implicitMods: [ 'Secrets of Suffering' ],
explicitMods: [], // arr2[1] in here
}
]
let arr2 = [
[
[ 'explicit.stat_2866361420' ],
[ 'explicit.stat_1978899297' ],
[ 'explicit.stat_2290031712' ],
[ 'explicit.stat_4294267596' ]
],
[
[ 'explicit.stat_2974417149' ],
[ 'explicit.stat_3556824919' ],
[ 'explicit.stat_789117908' ],
[ 'explicit.stat_124131830' ],
[ 'explicit.stat_1600707273' ],
[ 'explicit.stat_3742945352' ]
]
]
i want put arr2[0] to arr1's first explicitMods and arr2[1] to arr1's second explicitMods, how i can get object order in array (e.g.arr1[0]==={first object}, arr1[1]==={second object})? and how to achieve my goal?
i tried to use
arr1.map(el=>el.explicitMods = arr2)
and result is explicitMods: [[Array], [Array]]
explicitMods: [[Array], [Array]]@Yogi