How to Pull a text.JSON from stored Thunkable Assets

In Blocks, how do I access the Asses to pull a stored text.JSON file .. I do not want to use an external server, just pull it directly from the stored assets .. how?

Hi @thunkable.pupil162fb
It is not possible to call the JSON from the assets using blocks.
If you set the variable using this text, what do you see on the label?
The function variables shouldn’t be empty.
Could you please remove the variable y?
Also, instead of using the variable X with the get properties of the object, connect directly the get properties of the object into the return.

Here is an example that works:

thank you .. understood .. I cannot call the text.JSON from Assets ..

Sorry about the messy ‘x’ in coding .. that y should have been an x .. but .. I do not think I need a parameter in the Thunkable logic block to call the function .. change the x to y and plug that line of JSON code (dog) into the var.JSON_in_Assets .. and this code works and is clean .. no need to pass to the function an input parameter for clean coding ..

(I write this as an add-reflection .. what is clean Thunkable Function Coding .. must a Return Function have a parameter sent to it to be correct .. I think the answer is ‘no’ .. )

1 Like