Skip to content Skip to sidebar Skip to footer

How To Convert Object Into String

i have this value in $scope in Angular $scope.tags = [ { text: 'test@test.com' }, { text: 'test1@test.com' }, { text: 'test2@test.com' },

Solution 1:

You can use map

tags = tags.map(function (el) {
  return el.text;
}).join(',');

Example


Post a Comment for "How To Convert Object Into String"