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

    Weird format with nested json arrays

    Scheduled Pinned Locked Moved Fixed
    1 Posts 1 Posters 647 Views 1 Watching
    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.
    • Jack de WildeJ Offline
      Jack de Wilde
      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

      Hello! It looks like you're interested in this conversation, but you don't have an account yet.

      Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

      With your input, this post could be even better 💗

      Register Login
      • First post
        Last post