You have the wrong definition. Instead of having an object containing 3 arrays, you need an array of objects.
like this:
var sample = [{Name:"a",Age:1}, {Name:"b",Age:2}, {Name:"c",Age:3}];
Then you can do:
var name0 = sample[0].Name; var age0 = sample[0].Age;
or get all your names as per your example:
var names = [sample[0].Name,sample[1].Name,sample[2].Name];
But, not looping, I'm not sure how you get any number of values ββ.... why are there no loops?
Just say that you are doing a loop, here is how you do it:
var names = [] for(x in sample) names.push(sample[x].Name);
or using jQuery (which is still looping)
sample= jQuery.map(sample, function(n, i){ return n.Name; });
source share