Advertisement
Guest User

Untitled

a guest
Jul 25th, 2017
75
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.71 KB | None | 0 0
  1. %%=v(@subject)=%%
  2.  
  3. %%[VAR @subject
  4. SET @subject = "Some content" ]%%
  5.  
  6. <script runat="server">
  7. Platform.Load("Core", "1")
  8. var response = HTTP.Get('http://www.example.com');
  9. var jsonObject = eval("(" + response.Content + ")");
  10. </script>
  11.  
  12. <script runat="server">
  13. var subject = evaluatedJSON.navigate.through.object.to.find.subject;
  14. Platform.Variable.SetValue("@subject",subject);
  15. </script>
  16.  
  17. %%[VAR @subject]%%
  18. <script runat="server">
  19. Platform.Load("Core", "1")
  20. var response = HTTP.Get('http://www.mynews.com/fresh.json');
  21. var jsonObject = eval("(" + response.Content + ")");
  22. var subject = jsonObject.news[0].subject;
  23. Platform.Variable.SetValue("@subject",subject);
  24. </script>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement