I've been utilizing a service to input my form data into an array within my angular2 application. The information is organized in the following manner:
arr = []
arr.push({title:name})
After executing console.log(arr)
, it displays as Object. However, I am aiming to have it represented as [ { 'title':name } ]
. Is there a way to accomplish this?