HISE Logo Forum
    • Categories
    • Register
    • Login

    How to loop object key/values

    Scheduled Pinned Locked Moved Scripting
    3 Posts 2 Posters 698 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.
    • d.healeyD
      d.healey
      last edited by

      What's the best method to loop through an object and get it's keys and values in HISE?

      I tried the usual for (var k in obj) {}; but it wasn't recognised. I've also tried using Object.keys but same problem.

      Libre Wave - Freedom respecting instruments and effects
      My Patreon - HISE tutorials
      YouTube Channel - Public HISE tutorials

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

        'for(key in object)'. I know it should accept the 'var' at the beginning of the loop statement, but the parser is a bit quirky here.

        1 Reply Last reply Reply Quote 0
        • d.healeyD
          d.healey
          last edited by d.healey

          Oh, that simple :) thanks

          Libre Wave - Freedom respecting instruments and effects
          My Patreon - HISE tutorials
          YouTube Channel - Public HISE tutorials

          1 Reply Last reply Reply Quote 0
          • First post
            Last post

          58

          Online

          1.7k

          Users

          11.7k

          Topics

          101.8k

          Posts