☑ Doubt about array push

Hello, i have made this line:

this.inventory.push("lootID:"+lootUID+","+this.dataWeapons[i]);

where lootUID is a variable and this.dataWeapons is an array, i need to add a value to the inventory array where the lootID value is incremented every time a push is fired (lootUID++) and the dataweapons is get from the array built in json. I think it’s not correct my line

ok solved like this, added the lootID value into dataweapons and after pushing the item into the inventory changed the loodID value
`

this.inventory.push(this.dataWeapons[i]);
this.inventory[this.inventory.length-1].lootID=lootUID;
lootUID++;`