I have a JSON object within an array that I want to push to an employeeArray.
employeeArray =[
[
{
"ID":"967",
"NAME":"Dang, Lance D",
"Email":"<a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="0e426f606d6b204a6f60694e767774206d6163">[email protected]</a>"
}
],
[
{
"ID":"450",
"NAME":"Starnes, Mitch",
"Email":"<a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="266b4f52454e434a4a0875524754484355665e5f5c0845494b">[email protected]</a>"
}
],
[
{
"ID":"499",
"NAME":"Cosby, Lance H",
"Email":"<a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="f8b499969b9dd6bb978b9a81b8808182d69b9795">[email protected]</a>"
}
]
];
I am looking to transform the two-dimensional employeeArray into a single array with JSON objects like this:
employeeArray =[
{
"ID":"967",
"NAME":"Dang, Lance D",
"Email":"<a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="5e123f303d3b701a3f30391e262724703d3133">[email protected]</a>"
},
{
"ID":"450",
"NAME":"Starnes, Mitch",
"Email":"<a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="c489adb0a7aca1a8a8ea97b0a5b6aaa1b784bcbdbeeaa7aba9">[email protected]</a>"
},
{
"ID":"499",
"NAME":"Cosby, Lance H",
"Email":"<a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="cf83aea1acaae18ca0bcadb68fb7b6b5e1aca0a2">[email protected]</a>"
}
];
I need assistance in using the values from the two-dimensional array to create the desired array using pure JavaScript.