I want to know if this is possbile
arr1 = [{
text: "John",
Description: "tall"
}, {
text: "Dave",
Description: "short"
}, {
text: "Christian",
Description: "medium"
}, {
text: "Mark",
Description: "thin"
}]
arr2 = [{
text2: "Orange",
Description2: "sweet"
}, {
text2: "Prunes",
Description2: "Bitter"
}, {
text2: "Apple",
Description2: "sweet"
}]
I want to merge the two arrays to look like this
arr3 = [{
text: "John",
Description: "tall",
text2: "Orange",
Description2: "sweet"
}, {
text: "Dave",
Description: "short",
text2: "Prunes",
Description2: "Bitter"
}, {
text: "Christian",
Description: "medium",
text2: "Apple",
Description2: "sweet"
}, {
text: "Mark",
Description: "thin"
}]
I have tried to use concat() but it only puts the merge object at the end of the first array it does not seem to give the output that I want.