• Products
    • Isadora
    • Get It
    • ADD-ONS
    • IzzyCast
    • Get It
  • Forum
  • Help
  • Werkstatt
  • Newsletter
  • Impressum
  • Dsgvo
  • Press
  • Isadora
  • Get It
  • ADD-ONS
  • IzzyCast
  • Get It
  • Press
  • Dsgvo
  • Impressum

Navigation

    • Register
    • Login
    • Search
    • Categories
    • Recent
    • Popular
    • Tags

    [ANSWERED] Json question (id)

    How To... ?
    2
    5
    637
    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.
    • Armando
      Armando Beta Gold last edited by Woland

      Hello all,

      I am studying Json structure to better understand the bundling and the parsing of data. Although Mark's examples in the help section of the site are clear and function perfectly I tried other examples and I wasn't able to make the work completely. I think it has to do with how Isadora is managing the id

      {
        "student": [ 

           { 
              "id":"01", 
              "name": "Tom", 
              "lastname": "Price" 
           }, 

           { 
              "id":"02", 
              "name": "Nick", 
              "lastname": "Thameson" 
           } 
        ]   
      }

      As you can see in the image it is pretty simple, but Id don't seem to work correctly. The example was taken here

      What is wrong ?


      Thanks

      Armando Menicacci
      www.studiosit.ca
      MacBook Pro 16-inch, 2021 Apple M1 Max, RAM 64 GB, 4TB SSD, Mac OS Sonoma 14.4.1 (23E224)

      DusX 1 Reply Last reply Reply Quote 0
      • DusX
        DusX Tech Staff @Armando last edited by Woland

        @armando said:

        pretty simple, but Id don't seem to work correctly

         I believe it is working as expected. The issue here is that the selection is not done using the "id" value in the JSON data. The selection is made based on the numeric index. The index is zero-based, so this is why you see selecting 0 outputs the JSON with the 'id' of '01'. The position-based index has no relationship to the data's "id".


        If you want to combine the selections together so you use fewer JSON Parsers, I added a few to the bottom of this screen capture.


        If you want to get the data for a Student where the "id" value equals a specific value you need to send the JSON into the Javascript actor and loop through the values looking for a match.

        Troikatronix Technical Support

        • New Support Ticket Link: https://support.troikatronix.com/support/tickets/new
        • My Add-ons: https://troikatronix.com/add-ons/?u=dusx
        • Profession Services: https://support.troikatronix.com/support/solutions/articles/13000109444-professional-services

        Running: Win 11 64bit, i7, M.2 PCIe SSD's, 32gb DDR4, nVidia GTX 4070 | located in Ontario Canada.

        1 Reply Last reply Reply Quote 2
        • Armando
          Armando Beta Gold last edited by

          Thanks a lot @dusx,

          everything works like a charm now, Although I don't really get the javascript workaround to use less Json parsers and "loop through the values. Whwt do you mean can you give an example please ?

          Thanks

          Armando

          Armando Menicacci
          www.studiosit.ca
          MacBook Pro 16-inch, 2021 Apple M1 Max, RAM 64 GB, 4TB SSD, Mac OS Sonoma 14.4.1 (23E224)

          DusX 1 Reply Last reply Reply Quote 0
          • DusX
            DusX Tech Staff @Armando last edited by

            @armando said:

            loop through the values

             I wasn't sure how you wanted to find the values.
            For example if you wanted the values for any student with the lastname "Price", using javascript you could search all the students and return the records for any that match.
            In the case of these student ID's you might search for the student with the id of "01" get the details for Tom Price.

            Troikatronix Technical Support

            • New Support Ticket Link: https://support.troikatronix.com/support/tickets/new
            • My Add-ons: https://troikatronix.com/add-ons/?u=dusx
            • Profession Services: https://support.troikatronix.com/support/solutions/articles/13000109444-professional-services

            Running: Win 11 64bit, i7, M.2 PCIe SSD's, 32gb DDR4, nVidia GTX 4070 | located in Ontario Canada.

            Armando 1 Reply Last reply Reply Quote 0
            • Armando
              Armando Beta Gold @DusX last edited by

              @dusxThanks,

              I still don't know wow to do that in Javascript, bit it is nice to know that is is possible.

              Thanks again

              Armando Menicacci
              www.studiosit.ca
              MacBook Pro 16-inch, 2021 Apple M1 Max, RAM 64 GB, 4TB SSD, Mac OS Sonoma 14.4.1 (23E224)

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