☑ Doubt about array push

Hello, i have made this line:


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