I have an issue with a project I’m working on I need to make a block that reports a list set by another block, and to do that i encode that into a json and then decode the json.. but there’s a issue
Whenever I join the block and the string it removes the first and last [ and ]
Anyone know how to fix/stop this?
I tried appending [ and ] to the end and start of the text but it doesn’t work and snap says they are different despite them being visually identical
And even stranger it appears the text isn’t even existing
Does doing this help you?
Yeah! That worked
Do you know why this happened?
The reason this was an issue is that when you join
[<text>] into a block input, it interprets the input like what happens when you select a value in the item block.
rather than typing the value directly in the input
What's the real problem here?
You can’t have that be in an input argument for a custom block because of inputs
That works well for 1d lists but I need 2d lists as well something I’m not sure about
This was the closest I was able to get
Aha I got it
The secret was making the 2 things into a list block and then listing the list block and calling it, then joining that with columns and a report block
You don't have to use JSON, you can also try CSV.
The downside to this is that you cant make 3D lists with CSV:
You could make a block that gets the dimensions of all the lists in a list, turn that data into a 2D or 1D list, and do the same for the input list.
The data set can be more than numbers, the data set can have text in it and comas so csv wasn’t really an option
CSV can handle non number data, as well as commas
It doesn’t really matter anymore as I’m using the listify block
There is a version that can work with recursive lists
This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.