I have exhausted looking for an answer so I am going to ask.
I have 2 arrays and I need to join them so that I can then have my table created from a single array and send it out. Here are the arrays:
Array1
Names from a name picker
{
"Resource Name": "First Last"
}
2nd Array has a number that is a string input on the front end form but I convert to an array so it looks like this
{
"percent": "100"
}
The first array might have 1 or 20 names in it and the 2nd array will have the same number of items as the first array. I need to add the 2nd array to the first as a property so that it comes out like this:
[
{
"Resource Name": "First Last",
"Percent Allocated": "100"
},
{
"Resource Name": "First Last",
"Percent Allocated": "50"
}
]
How do I merge the arrays based on position of the items, for instance the 2nd array [0] goes to the first array [0] as a property and so on throughout the total number of items?
Thank you in advance!
Mokono