Quantcast
Channel: Ionic Framework - Ionic Forum
Viewing all articles
Browse latest Browse all 49526

I have facing array map function

$
0
0

@flycoders_sourav wrote:

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) {
                console.log(el)
                var o = Object.assign({}, el);
                o.averageRating = this.rating[j].averageRating
                return o;
              })
              console.log(result)
}

Thanks in advance

Posts: 1

Participants: 1

Read full topic


Viewing all articles
Browse latest Browse all 49526

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>