For the inner repeat, you need to limit the objects that are displayed based on the outer category.
Let's assume that "category" is the collection name for the category in the outer repeat, to limit the collection of the inner repeat you could do something like:
var innerColl = [];
for (var i=0; j=myJSONObject.length, i<j; i++) {
if (myJSONObject[i].category.equals( category )) {
innerColl .push( myJSONObject[i] );
}
}
return innerColl ;
Mark