Fixed sub-cat variable name problem, used Object[i]['sub-cat'] to fix.