meteor - How to get phones from users collection -


i need phone numbers textarea users collection.how can do?

smsnumaralar=textarea

template.uyeleresmsgonder.events({     'click #numaralarikopyala': function (e, template) {      var getdata=meteor.users.find({});      template.$('#smsnumaralar').val(getdata.profile.phone);          }       }); 

you can extract array of phone numbers using map, join given separating character (a newline in example), , put newly created string of phone numbers in textarea:

template.uyeleresmsgonder.events({     'click #numaralarikopyala': function (e, template) {      var phonenumbers=meteor.users.find({}).map(function (user) {        return user.profile.phone;      }).join('\n');      template.$('#smsnumaralar').val(phonenumbers);     }  }); 

Comments

Popular posts from this blog

Upgrade php version of xampp not success -

amazon web services - S3 and apache mod_proxy with basic authentication -

powershell - This solution contains one or more assemblies targeted for the global assembly cache -