Home › Forums › General Questions › Reading JSON file matrix
- This topic has 7 replies, 3 voices, and was last updated 3 months, 1 week ago by
QiangGe.
-
AuthorPosts
-
2025-08-27 at 2:03 pm #84308
jelteh
ParticipantGoodday reader,
I am currently working on a function in Puzzles to read out a JSON file, and output the correct number. But somehow I can’t seem to read it out properly. It is a nested JSON, and I’ll put it in the attachement of this post, along with my Puzzles structure. Could somebody help me figure out how to read these values out?
Thanks in advance!
Attachments:
2025-08-27 at 2:54 pm #84311jelteh
ParticipantIt has come to my attention that I should probably use “create list” instead of “create text” puzzles. It shows up correctly in the console now when I print, but it can’t yet read out the JSON file for some reason.
2025-08-28 at 12:21 am #84316
QiangGeParticipantbut it can’t yet read out the JSON file for some reason.
Can you upload this JSON file
2025-08-28 at 8:01 am #84319
RoelCustomerGood morning!
I made a quick example for you with logging and puzzles basics.
This is one of the ways to get the information from a nested json.Depending on what u want/need u can rebuild this to fit your needs.
Attachments:
2025-08-28 at 9:03 am #84323jelteh
ParticipantGoodmorning, thanks for the replies.
I am still unable to read it out. I’ll put the code in down below.
The thing is that I need the keys to be flexible. When the user selects a certain size (both width and height), it should automatically use the JSON as a look-up table and get the proper value. That’s the context for this file, and that is why I’ve ordered it this way.When I print the loaded data and in dict get key they do show up. But when I try to get to a key within the key, it seems not to work. Some additional information would be appreciated :) Thanks in advance
2025-08-28 at 9:37 am #84324jelteh
ParticipantThis is what I recreated btw, but I cannot get it to give me a key within a key…
-
This reply was modified 3 months, 1 week ago by
jelteh.
Attachments:
2025-08-28 at 10:56 am #84330
RoelCustomerThis shows how to get the key in a parent object.
From that u we print the value.But for your needs i think u have to make it a bit more dynamic.
If u have more questions please feel free to email me on r.adriaans@cpqfactory.comAttachments:
2025-08-28 at 11:27 am #84332
QiangGeParticipant -
AuthorPosts
- You must be logged in to reply to this topic.






