Get average of each nested array in dynamic object
First off, you should ensure that each key is a properly defined member of movieObj, not part of the prototype:

for (var key in movieObj) {
    if (movieObj.hasOwnProperty(key)) {
        // ...
    }
}


Instead of declaring getSum on Array, you can use the builtin reduce function:

var sum = function(previous, current) {
    return previous + current;
};

var ratings = movieObj[key].rating;

if (ratings.reduce(sum) / ratings.length &lt; 5) {
    // ...
}


Finally, your console.log statement can use direct property access, instead of square bracket notation.  I believe moveName is a typo, and should in fact be movieName, but correct me if I'm wrong there:

console.log(movieObj[key].movieName);


Putting it all together gives:

var sum = function(previous, current) {
    return previous + current;
};

for (var key in movieObj) {
    if (movieObj.hasOwnProperty(key)) {
        var ratings = movieObj[key].rating;

        if (ratings.reduce(sum) / ratings.length &lt; 5) {
            console.log(movieObj[key].movieName);
        }
    }
}