I have facing array map function

I tired to insert new object in my existing array but when i used this below code showing an error ERROR TypeError: “this is undefined” please help me out it would be appreciate

for(let j=0; j<this.rating.length;j++){
              var result = this.allpohotographer.map(function(el) {
                var o = Object.assign({}, el);
                o.averageRating = this.rating[j].averageRating
                return o;

Thanks in advance