Skip to content

Instantly share code, notes, and snippets.

@zuzannamj
Created September 27, 2019 20:26
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save zuzannamj/8134eeca5ca923b4e8417dac3eadcbf1 to your computer and use it in GitHub Desktop.
Save zuzannamj/8134eeca5ca923b4e8417dac3eadcbf1 to your computer and use it in GitHub Desktop.
<script runat="server" language="javascript">
Platform.Load("Core","1");
//Get the @response variable from AMPscript
var response = Variable.GetValue("@response");
//Parse JSON
var json = Platform.Function.ParseJSON(response);
//Set the @hdurl variable to be accessible in AMPscript
Variable.SetValue("@hdurl",json.hdurl);
</script>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment