ParseJSON using SSJSUsing AMPscript with SSJS ActivitiesHow to resubscribe a user in Marketing cloud using SSJS?Pulling Subscriber Status from Lists using SSJSRetrieving Emails using SSJSProblem in updating DE using SSJSUsing SSJS to send single email in Marketing CloudError adding EmailSendDefinition using SSJS

Is there any way to stop a user from creating executables and running them?

What is this "Table of astronomy" about?

How far did Gandalf and the Balrog drop from the bridge in Moria?

Can "être sur" mean "to be about" ?

Is there a Morita cocycle for the mapping class group Mod(g,n) when n > 1?

Why isn’t SHA-3 in wider use?

AsyncDictionary - Can you break thread safety?

What is this 1990s horror game of otherworldly PCs dealing with monsters on modern Earth?

On the Rømer experiments and the speed of light

visible indication that a cell is not evaluatable

Is 悪いところを見つかった proper Japanese?

Is this n-speak?

Can sampling rate be a floating point number?

Creating multi-attribute primary key in table in ArcGIS Desktop

TEMPO: play a sound in animated GIF/PDF/SVG

Can a PC use the Levitate spell to avoid movement speed reduction from exhaustion?

How much maintenance time did it take to make an F4U Corsair ready for another flight?

Is there a SQL/english like language that lets you define formulations given some data?

Why command hierarchy, if the chain of command is standing next to each other?

How can God warn people of the upcoming rapture without disrupting society?

What is my malfunctioning AI harvesting from humans?

Why aren't rainbows blurred-out into nothing after they are produced?

If clocks themselves are based on light signals, wouldn't we expect the measured speed of light to always be the same constant?

Redis Cache Shared Session Configuration



ParseJSON using SSJS


Using AMPscript with SSJS ActivitiesHow to resubscribe a user in Marketing cloud using SSJS?Pulling Subscriber Status from Lists using SSJSRetrieving Emails using SSJSProblem in updating DE using SSJSUsing SSJS to send single email in Marketing CloudError adding EmailSendDefinition using SSJS






.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty margin-bottom:0;








2















I am unable to extract msg from the JSON response. @returnCode works fine and I am passing it to SSJS, but then I cannot get the msg value.



<script runat="server" language="javascript">
Platform.Load("Core","1");
var jsonresponse = Variable.GetValue("@response");
var json = Platform.Function.ParseJSON(jsonresponse.msg);
Write("<br>message: " + msg);
</script>


Here's my json for reference:




"msg":"success","date":"2019-08-12","explanation":"xxxxxxx"




Any idea what is wrong with above?










share|improve this question
































    2















    I am unable to extract msg from the JSON response. @returnCode works fine and I am passing it to SSJS, but then I cannot get the msg value.



    <script runat="server" language="javascript">
    Platform.Load("Core","1");
    var jsonresponse = Variable.GetValue("@response");
    var json = Platform.Function.ParseJSON(jsonresponse.msg);
    Write("<br>message: " + msg);
    </script>


    Here's my json for reference:




    "msg":"success","date":"2019-08-12","explanation":"xxxxxxx"




    Any idea what is wrong with above?










    share|improve this question




























      2












      2








      2








      I am unable to extract msg from the JSON response. @returnCode works fine and I am passing it to SSJS, but then I cannot get the msg value.



      <script runat="server" language="javascript">
      Platform.Load("Core","1");
      var jsonresponse = Variable.GetValue("@response");
      var json = Platform.Function.ParseJSON(jsonresponse.msg);
      Write("<br>message: " + msg);
      </script>


      Here's my json for reference:




      "msg":"success","date":"2019-08-12","explanation":"xxxxxxx"




      Any idea what is wrong with above?










      share|improve this question
















      I am unable to extract msg from the JSON response. @returnCode works fine and I am passing it to SSJS, but then I cannot get the msg value.



      <script runat="server" language="javascript">
      Platform.Load("Core","1");
      var jsonresponse = Variable.GetValue("@response");
      var json = Platform.Function.ParseJSON(jsonresponse.msg);
      Write("<br>message: " + msg);
      </script>


      Here's my json for reference:




      "msg":"success","date":"2019-08-12","explanation":"xxxxxxx"




      Any idea what is wrong with above?







      marketing-cloud ssjs






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited 14 hours ago







      CodeRage

















      asked 15 hours ago









      CodeRageCodeRage

      6362 silver badges18 bronze badges




      6362 silver badges18 bronze badges























          1 Answer
          1






          active

          oldest

          votes


















          5














          You don't have any variable named msg.
          Try this:



          <script runat="server" language="javascript">
          Platform.Load("Core","1");
          var jsonresponse = Variable.GetValue("@response");
          var json = Platform.Function.ParseJSON(jsonresponse);
          Write("<br>message: " + json.msg);
          </script>





          share|improve this answer

























          • oh wow, that was simple - thanks!!

            – CodeRage
            14 hours ago













          Your Answer








          StackExchange.ready(function()
          var channelOptions =
          tags: "".split(" "),
          id: "459"
          ;
          initTagRenderer("".split(" "), "".split(" "), channelOptions);

          StackExchange.using("externalEditor", function()
          // Have to fire editor after snippets, if snippets enabled
          if (StackExchange.settings.snippets.snippetsEnabled)
          StackExchange.using("snippets", function()
          createEditor();
          );

          else
          createEditor();

          );

          function createEditor()
          StackExchange.prepareEditor(
          heartbeatType: 'answer',
          autoActivateHeartbeat: false,
          convertImagesToLinks: false,
          noModals: true,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: null,
          bindNavPrevention: true,
          postfix: "",
          imageUploader:
          brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
          contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
          allowUrls: true
          ,
          onDemand: true,
          discardSelector: ".discard-answer"
          ,immediatelyShowMarkdownHelp:true
          );



          );













          draft saved

          draft discarded


















          StackExchange.ready(
          function ()
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsalesforce.stackexchange.com%2fquestions%2f273260%2fparsejson-using-ssjs%23new-answer', 'question_page');

          );

          Post as a guest















          Required, but never shown

























          1 Answer
          1






          active

          oldest

          votes








          1 Answer
          1






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes









          5














          You don't have any variable named msg.
          Try this:



          <script runat="server" language="javascript">
          Platform.Load("Core","1");
          var jsonresponse = Variable.GetValue("@response");
          var json = Platform.Function.ParseJSON(jsonresponse);
          Write("<br>message: " + json.msg);
          </script>





          share|improve this answer

























          • oh wow, that was simple - thanks!!

            – CodeRage
            14 hours ago















          5














          You don't have any variable named msg.
          Try this:



          <script runat="server" language="javascript">
          Platform.Load("Core","1");
          var jsonresponse = Variable.GetValue("@response");
          var json = Platform.Function.ParseJSON(jsonresponse);
          Write("<br>message: " + json.msg);
          </script>





          share|improve this answer

























          • oh wow, that was simple - thanks!!

            – CodeRage
            14 hours ago













          5












          5








          5







          You don't have any variable named msg.
          Try this:



          <script runat="server" language="javascript">
          Platform.Load("Core","1");
          var jsonresponse = Variable.GetValue("@response");
          var json = Platform.Function.ParseJSON(jsonresponse);
          Write("<br>message: " + json.msg);
          </script>





          share|improve this answer













          You don't have any variable named msg.
          Try this:



          <script runat="server" language="javascript">
          Platform.Load("Core","1");
          var jsonresponse = Variable.GetValue("@response");
          var json = Platform.Function.ParseJSON(jsonresponse);
          Write("<br>message: " + json.msg);
          </script>






          share|improve this answer












          share|improve this answer



          share|improve this answer










          answered 14 hours ago









          user3274635user3274635

          18210 bronze badges




          18210 bronze badges















          • oh wow, that was simple - thanks!!

            – CodeRage
            14 hours ago

















          • oh wow, that was simple - thanks!!

            – CodeRage
            14 hours ago
















          oh wow, that was simple - thanks!!

          – CodeRage
          14 hours ago





          oh wow, that was simple - thanks!!

          – CodeRage
          14 hours ago

















          draft saved

          draft discarded
















































          Thanks for contributing an answer to Salesforce Stack Exchange!


          • Please be sure to answer the question. Provide details and share your research!

          But avoid


          • Asking for help, clarification, or responding to other answers.

          • Making statements based on opinion; back them up with references or personal experience.

          To learn more, see our tips on writing great answers.




          draft saved


          draft discarded














          StackExchange.ready(
          function ()
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsalesforce.stackexchange.com%2fquestions%2f273260%2fparsejson-using-ssjs%23new-answer', 'question_page');

          );

          Post as a guest















          Required, but never shown





















































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown

































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown







          Popular posts from this blog

          Sahara Skak | Bilen | Luke uk diar | NawigatsjuunCommonskategorii: SaharaWikivoyage raisfeerer: Sahara26° N, 13° O

          The fall designs the understood secretary. Looking glass Science Shock Discovery Hot Everybody Loves Raymond Smile 곳 서비스 성실하다 Defas Kaloolon Definition: To combine or impregnate with sulphur or any of its compounds as to sulphurize caoutchouc in vulcanizing Flame colored Reason Useful Thin Help 갖다 유명하다 낙엽 장례식 Country Iron Definition: A fencer a gladiator one who exhibits his skill in the use of the sword Definition: The American black throated bunting Spiza Americana Nostalgic Needy Method to my madness 시키다 평가되다 전부 소설가 우아하다 Argument Tin Feeling Representative Gym Music Gaur Chicken 일쑤 코치 편 학생증 The harbor values the sugar. Vasagle Yammoe Enstatite Definition: Capable of being limited Road Neighborly Five Refer Built Kangaroo 비비다 Degree Release Bargain Horse 하루 형님 유교 석 동부 괴롭히다 경제력

          19. јануар Садржај Догађаји Рођења Смрти Празници и дани сећања Види још Референце Мени за навигацијуу