I have some values in a variable that could contain unknown number of arrays. for example,
digitalData.product[0] = "123";
digitalData.product[1] ="456";
and so on.
How is it possible to go through this arrays and then return the values? So, the desired output would be - 123;456;. Would the below work?
function range(start, count) {
if (arguments.length == 1) {
count = start;
start = 0;
}
var foo = [];
for (var i = 0; i < count; i++) {
foo.push(start + i);
}
return digitalData.product.foo;
}
I would very much appreciate any help.