我遇到了一个有趣的挑战,不知道如何解决它。我正在从我的 mailchimp 中提取订阅者列表,并用数据填充我网站上的成员页面。我注册的字段之一是“网站或LinkedIn个人资料网址”。
我想做的是,检查他们是否提供了一个linkedin地址,如果有,将他们的url放在linkedin成员插件中,如果没有使用其他数据来创建一个更简单的个人资料、名称网站、标题等。
我的问题是我不能说是否 data.websiteField.match(/linkedin/) 在玉中,所以我要么需要将数据传递给我遇到问题的一些客户端 javascript,要么做其他事情。
这是从 mailchimp 返回的数据示例
[ // this first bit is just the fields
[
"email address",
"first name",
"last name",
"role",
"organization",
"headline",
"website",
"areas of interest",
"please email me about:",
"member_rating",
"optin_time",
"optin_ip",
"confirm_time",
"confirm_ip",
"latitude",
"longitude",
"gmtoff",
"dstoff",
"timezone",
"cc",
"region",
"last_changed"
],
[ // and here's the first user
"woop@booomshakala.com", // haha, just hiding some data
"Woop",
"Shak",
"Tester",
"ShakaCo",
"Whooooooper",
"http://linkedin.com/in/costamichailidis", // hit me up sometime
"Creativity, Innovation, Ideas and Science",
"Job Placement, Internships, Recruitment & Retention, Technology & MOOCs, Measurement & Evaluation, Documentation & Dissemination",
2,
"2013-03-28 19:28:55",
"173.52.122.111",
"2013-03-28 19:29:12",
"173.52.122.111",
"40.7648000",
"-73.7775000",
"-5",
"-4",
"America/New_York", "US", "NY", "2013-03-28 19:29:12"
]
]
任何帮助都会摇滚!
另外,我正在使用快递。express 是否使本地人在客户端 JavaScript 中可用?