Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- %%=v(@subject)=%%
- %%[VAR @subject
- SET @subject = "Some content" ]%%
- <script runat="server">
- Platform.Load("Core", "1")
- var response = HTTP.Get('http://www.example.com');
- var jsonObject = eval("(" + response.Content + ")");
- </script>
- <script runat="server">
- var subject = evaluatedJSON.navigate.through.object.to.find.subject;
- Platform.Variable.SetValue("@subject",subject);
- </script>
- %%[VAR @subject]%%
- <script runat="server">
- Platform.Load("Core", "1")
- var response = HTTP.Get('http://www.mynews.com/fresh.json');
- var jsonObject = eval("(" + response.Content + ")");
- var subject = jsonObject.news[0].subject;
- Platform.Variable.SetValue("@subject",subject);
- </script>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement