Last active
June 15, 2019 21:03
-
-
Save wvpv/0dbd0e1a46d32106f804c3334db956d0 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<script type="text/javascript" runat="server"> | |
Platform.Load("core", "1"); | |
var authCookie = Platform.Request.GetCookieValue('auth'); | |
if (authCookie) { | |
var state = Request.GetQueryStringParameter("state"); | |
var citiesDE = DataExtension.Init("Cities"); | |
var cities = citiesDE.Rows.Lookup(["state"], [state], 100); | |
cities = cities ? cities : ""; | |
//Write('{"results":' + Stringify(cities) +',"debug":[{"authCookie":"'+authCookie+'"}]}'); | |
Write('{"results":' + Stringify(cities) + '}'); | |
} | |
</script> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment