How can I insert data in an array-object like this?

Hi guys my main goal it’s create this Array-Object:
I wanna push in “user” a phone object with Key Number and Number as Value.
For each number that users enters.
Any tip about how to do this inside the for loop?

let usersPhone = {
  "users": [
     {"phone":[{"number": "+15005550001"}]},
     {"phone":[{"number": "+09999999999"}]},
   ]
}

And I got something like this, this For Loop cotains phone numbers:

let phoneNumbers = containerEmails.getElementsByTagName('div')

for (let i = 0; i < phoneNumbers.length; i++) {
  let numbersPhone = phoneNumbers[i].innerText.replace(/[^0-9+]/g,'') //--> Phone Numbers: "+11234", "+154321"
}

I would google “javascript create object”. The first result I got back is a link to an FCC article that explains how to create an object.

I’m not completely sure I understand exactly what you are trying to do here. Is the phoneNumbersArr supposed to be structured the same way as the users array?

Alteady fix my cuestion. Look at the For Loop. I receive various Phone numbers “+1234534”, “+15435364”, and so on…

My main goal is Push phone object inside Users array, for every phone number, a “phone” object in Users array.

let usersPhone = {
“users”: [
{“phone”:[{“number”: “+15005550001”}]},
{“phone”:[{“number”: “+09999999999”}]},
]
}

Solution:

let usersPhone = []

let phoneNumbers = containerEmails.getElementsByTagName('div')

for (let i = 0; i < phoneNumbers.length; i++) {
    let numbersPhone = phoneNumbers[i].innerText.replace(/[^0-9+]/g,'')
    usersPhone.push( {"phone": [{"number": numbersPhone}]} )
}