Escape of quotes

Tagged:
  • Klaus79
    Teilnehmer
      vor 5 Jahren, 9 Monaten #17736

      How can quotes be escaped in Business Object Script.

      Normally with backslash in JavaScript but it does not work.

      “\”username: \”” results in \”username: \” instead “username: “

      Kahn
      Moderator
        Has successfully completed the online course Introduction
        Has successfully completed the online course Intermediate (200)
        Has successfully completed the online course Advanced (300)
      vor 5 Jahren, 9 Monaten #17738
      Up
      1
      Down
      ::

      Do you get your result in the TEST-Dialog? If so, then do not worry, this is just the stringified JSON version of the result in the dialog, the provided value is not stringified but provided directly.

       

      Klaus79
      Teilnehmer
        vor 5 Jahren, 9 Monaten #17739
        Up
        0
        Down
        ::

        Yes, thinking about it yesterday I thought the same. I get following Output (not directly from a sql query but build up from script logic on my own based on a sql query. I think it’s correct.

         

        {
        “user_masterdata_vh”: [
        “{\”username\”:1, \”first_name\”:xxxx, \”last_name\”:xxxx, \”department\”:xxxx, \”email\”:xxxx}”,
        “{\”username\”:2, \”first_name\”:xxxx, \”last_name\”:xxxx, \”department\”:xxxx, \”email\”:xxxx}”
        ]
        }

      Ansicht von 3 Beiträgen – 1 bis 3 (von insgesamt 3)

      You must be logged in to reply to this topic.