logo hyperPad Forum
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Search
    • Login

    Weird format with nested json arrays

    Scheduled Pinned Locked Moved
    Fixed
    1
    1
    375
    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.
    • Jack8680J
      Jack8680
      last edited by Jack8680

      When I have nested json arrays, such as [["test","test2"]], getting the array value at index zero returns:

      (
      test,
      test2
      )

      Rather than simply ["test","test2"]. Putting this back into an array breaks things because of the line breaks, escaping them as ["(\n test,\n test2\n)"]. Interestingly, the get array value behaviour still works on this format, so perhaps it's intentional, but something is broken in my project so I'm guessing it's caused by this.

      Edit: it's not broken, it actually works fine and it was just not working because I was using trim text on the first character to check if it was an array, which obviously doesn't work without square brackets. Get array count works fine though,

      Edit2: it actually is breaking something else, but I don't have time to figure out where at the moment.

      Edit 2021:
      Don't mind me just testing something
      link text

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