This is the working fiddle .Just convert the object into array like this:
var array = $.map(data, function(value, index) {
return [value];
});
var arr =[];
for(var key in array)
{
var subcategories = array[key]['subcategories'];
for(var j in subcategories)
{
var prob = subcategories[j]['problems'];
for(var i in prob)
{
var moderate = prob[i]['breakdown']['moderate'];
var severe = prob[i]['breakdown']['severe'];
arr.push(moderate);
arr.push(severe);
}
}
}
alert(arr); //required array
var max = d3.max(arr) //required max value
and loop through it and save the values into a final array!