What you ask is retrieving all the data after freezing a dimension ("Statistic") to a certain category ("AJA01C1"), or what we may call getting a "subcube" (from the original cube).
Subcubes are tricky. The JSON-stat Javascript Toolkit (JJT) method that comes closer to what you need is .Data():
I'm guessing you are using this dataset:
It has 3 dimensions (none is constant).
.Data() has being designed to retrieve a single data (448.41):
j.Dataset(0).Data({"Type of Cattle": "B200", "Year": "2000", "Statistic": "AJA01C1"}).value
but it can also retrieve a one-dimensional array, for example, the time series for type of cattle "B200" and statistic "AJA01C1" (["..", "..", 246.19, 277.69, ...]):
j.Dataset(0).Data({"Type of Cattle": "B200", "Statistic": "AJA01C1"}).map(function(a){return a.value})
So, going back to your question, you could freeze "Statistic" ("AJA01C1") and iterate by "Type of Cattle" to get the time series of cattle price per head for each type of cattle. Or you could simply iterate for type of cattle AND time, and get a single data each time.
Iterating by dimension categories is easy with JJT:
var
ds=j.Dataset(0),
dtype=ds.Dimension("Type of Cattle"),
dyear=ds.Dimension("Year"),
;
for(var t=0, tlen=type.length; t<tlen; t++){
for(var y=0, ylen=year.length; y<ylen; y++){
console.log(
dtype.Category(t).label + " / " +
dyear.Category(y).label + " = " +
ds.Data({
"Statistic": "AJA01C1"
}).value
);
}
}
I hope this helps,
X.