HISE Logo Forum
    • Categories
    • Register
    • Login

    How to Use Dictionaries?

    Scheduled Pinned Locked Moved Solved General Questions
    5 Posts 2 Posters 134 Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • clevername27C
      clevername27
      last edited by clevername27

      What would be the equivalent for something like this in HISE's JavaScript implementation? (Or just use JSON?)

      var Zoo = {
      "Ferret": 1,
      "Wombat": 24,
      "Penguin": 25
      };

      Christoph HartC 1 Reply Last reply Reply Quote 0
      • Christoph HartC
        Christoph Hart @clevername27
        last edited by

        @clevername27 erm, that's valid JSON...

        clevername27C 1 Reply Last reply Reply Quote 1
        • clevername27C
          clevername27 @Christoph Hart
          last edited by clevername27

          @Christoph-Hart So it is, lol. I can't seem to make that syntax work in HISE Script?

          EDIT: Seems to be an issue with an error elsewhere in my code. NM and thanks.

          Christoph HartC 1 Reply Last reply Reply Quote 0
          • Christoph HartC
            Christoph Hart @clevername27
            last edited by

            @clevername27 you can even omit the quotes and write the keys directly:

            var Zoo = {
            Ferret: 1,
            Wombat: 24,
            Penguin: 25
            };
            
            clevername27C 1 Reply Last reply Reply Quote 1
            • clevername27C
              clevername27 @Christoph Hart
              last edited by

              @Christoph-Hart Cheers - did not know that, thank you again.

              1 Reply Last reply Reply Quote 0
              • clevername27C clevername27 has marked this topic as solved on
              • First post
                Last post

              31

              Online

              1.7k

              Users

              11.8k

              Topics

              102.7k

              Posts