I have an item containing the following data:
"Item": {
"data1": [],
"data2": [
"5",
"6",
"7",
"8"
]
}
Upon inspecting my item, I noticed that it consists of two sections. This is understandable since there are two arrays present. However, what I actually need is to merge these two arrays into a single one.
I've been experimenting with multiple methods for some time now, but none has yielded the desired outcome.
For instance:
var newArr = [];
newArr = [item.data1, item.data2]
Or:
$.each(item, function(key,value){
result[i] = value;
})
Any suggestions?