Saturday, September 30, 2017

How to get a value out of an array in typescript?

I have an array that looks like this

   const array: any[] = []
   array.push({ 'Comments': this.comment, 'Name': this.name, 'Description' : this.description })

I pass that array back to a parent component. How can I grab the value that is in Comments?

Source: AngularJS



from Angular Questions https://angularquestions.com/2017/09/30/how-to-get-a-value-out-of-an-array-in-typescript/
via @lzomedia #developer #freelance #web #lzomedia.com

No comments:

Post a Comment