1
我有一個有趣的挑戰,並不知道如何去解決它。我從我的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
"[email protected]", // 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"
]
]
返回的數據任何幫助將岩石樣本!
另外,我正在使用快遞。快遞是否讓客戶端JavaScript中的本地人可用?
你搖滾!我在文檔中閱讀過此內容。謝謝,諾亞。 – Costa
沒問題。將mailchimp數據轉換爲配置文件對象的代碼應該可以在某個點包裝成一個模塊 – Noah
我認爲最好的做法是將其作爲客戶端,作爲「加載 - 滾動」功能的一部分。我想如果我試圖操縱服務器上的每個用戶,這會妨礙性能。有什麼想法嗎? – Costa