Convert JSON to a different format (nested json)
var found = false;


Using flag is not good practice. 

This is better solution:

var movies = [
  {"name":"Ice Age 3", "language":"English", "year":"2012"},
  {"name":"Ice Age 3", "language":"French", "year":"2011"},
  {"name":"Ice Age 3", "language":"German", "year":"2013"},
  {"name":"Ice Age 4", "language":"German", "year":"2013"}
];

function convert(arr) {
    return $.map(unique(arr), function(name){
        return {
            name: name,
            details: $.grep(arr, function(item){
                return item.name == name
            })
        } 
    });
}

function unique(arr) {
    var result = [];
    $.map(arr, function(item){
        if ($.inArray(item.name, result))
            result.push(item.name);
    })
    return result;
}

console.log(convert(movies));