Get Object from json using GetColumn


#1

Would really appreciate if anyone could help me or guide me with blocks on how to get an object value i.e. “url” from following json format generated using GetColumn:

[[{“id”:“xxx”,“url”:“https://xxxx.jpg”,“filename”:“xxx.jpg”,“size”:xxx,“type”:“xxx”,“thumbnails”:{“small”:{“url”:“https://xxx”,“width”:xxx,“height”:xx},“large”:{“url”:“https://xxx”,“width”:xxx,“height”:xx},“full”:{“url”:“https://xxx”,“width”:xxx,“height”:xx}}}],[{“id”:“xxx”,“url”:“https://xxxx.jpg”,“filename”:“xxx.jpg”,“size”:xxx,“type”:“xxx”,“thumbnails”:{“small”:{“url”:“https://xxx”,“width”:xxx,“height”:xx},“large”:{“url”:“https://xxx”,“width”:xxx,“height”:xx},“full”:{“url”:“https://xxx”,“width”:xxx,“height”:xx}}}]]


#2

Anyone with any clue?


#3

Hey
Would you share some screenshot of your blocks and Airtable, please?


#4

Hi, my airtable has 7 columns

Col1 & 2 are text
Col 3 is number
Col 4 & 5 both Attachment
Col 6 is Link
Col 7 is Text

Column Name I need image from is called “GTP Images”


#5

Just a thing here.

You are extracting a column, with the result going into a local variable object named “column” which you are not using after; and you have a reference to an object named “value” which is never assigned to anything.

Perhaps that is the issue here.


#6

Sorry that value was meant to be column. Was doing another test with that before reverting back to GetColumn. Updated the image now.

The Label text shows “undefined”


#7

Hello there,
You just want to get URL from only the 1st row right?

Try this :
temp

Hope it helps! :wink:
Thanks! :smile:


#8

I know this already but this just gets row 1 image and not the entire images in that column at once


#9

Ok.

Your given blocks display only one image’s block… (That’s why I gave only image’s blocks :sweat_smile:)
Can u clearly say What do you want to achieve - get URL from AirTable / single images to display or 3 images to display?

I can’t get u…

Thanks!


#10

What do you mean “entire images”?

If you are getting the URL saved in “Label1.Text”, then it can only be one URL. It is not a list, it is a single entry.
Or am I misunderstanding something?


#11

I have 30 rows each with image in GTP Images column. I want to read all images in column into a list and pick each url as background images.

If I use GetCell, then I have to repeat that 30 times which will make code too large


#12

Perhaps, but if you are trying to stuff all the URL in a single string, that will not work.
I do not see any list in your blocks.

And I do not see any loop that would process multiple URL.


#13

Follow these steps please. I hope it helps you out.

  1. Set the column Type of “GTP Images” in Air Table to “A single line text”
  2. You can manage visible to True/False to list viewer “I am sure it easy for you to manage” because I post a screen shot of how you VIEW all images and how to GET a specific image to be as a background.

    My regards!
    Hayder

#14

Just don’t place the Screen2 opens block two times :sweat_smile:
They both are the same…


#15

Thanks mate!
As I built this as fast as I can, I forgot to change the other one to “Start” LOL
Now I hope my suggestion to be a solution to his problem because I tested it and it works.


#16

OK i didn’t want to use list view due to its limitation but I guess I will have to use it after all but I know it works well with listview. Will let you know how it goes. Thanks


#17

Where do you want your items to be viewed?


#18

What is the limitation of list viewer items?


#19

basically i want the images to be displayed as background on each button since i will also have a row under each button with buttons for share, like etc. with listview, i won’t be able to add row under each listview.


#20

The what you need is to use the 'make list from text with delimiter “,” ’ (or whatever your delimiter might be) and assign each element of the list to the component.

Yes, you will need to have as many component value assignation as you have components.