# Fetch Column

**URL:** https://community.glideapps.com/t/fetch-column/31731
**Category:** Ask for Help
**Tags:** custom-code
**Created:** [September 13, 2021, 3:09pm UTC](https://community.glideapps.com/t/fetch-column/31731 "2021-09-13T15:09:13Z")
**Posts on this page:** 20
**Page:** 2

<div class="post-metadata">

### Author: ![Robert\_Petitto](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/robert_petitto/32/25193_2.png) [@Robert\_Petitto](https://community.glideapps.com/u/Robert_Petitto)
#### Post date: [September 14, 2021, 4:41pm UTC](https://community.glideapps.com/t/fetch-column/31731/21 "2021-09-14T16:41:27Z")

</div>

> [@Fetch Column](https://community.glideapps.com/t/fetch-column/31731/13):
>
> As promised: [https://www.youtube.com/watch?v=oWrs8bRNyS4](https://www.youtube.com/watch?v=oWrs8bRNyS4)

Current Location works, too!

 ![Screen Shot 2021-09-14 at 12.41.03 PM](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/b/2/b2eeff7ce78c2549fb75eb521353eb0f64ee0dfd.png)

---

<div class="post-metadata">

### Author: ![david](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/david/32/62831_2.png) [@david](https://community.glideapps.com/u/david)
#### Post date: [September 14, 2021, 4:44pm UTC](https://community.glideapps.com/t/fetch-column/31731/22 "2021-09-14T16:44:38Z")

</div>

Wow! Did not know you could do that.

---

<div class="post-metadata">

### Author: ![gvalero](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/gvalero/32/1037_2.png) [@gvalero](https://community.glideapps.com/u/gvalero)
#### Post date: [September 14, 2021, 4:47pm UTC](https://community.glideapps.com/t/fetch-column/31731/23 "2021-09-14T16:47:00Z")

</div>

Right but I would try to return an array with all values and later using Single Value columns, choose and show the wished values reading the item position in array. This will apply in cases where I want to retrieve more than 4-5 values from JSON payload.

But, we have to modify/improve the David’s column/script to get an array. 👊

Nice to see these ideas over here!.

---

<div class="post-metadata">

### Author: ![Jeff\_Hager](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/jeff_hager/32/43_2.png) [@Jeff\_Hager](https://community.glideapps.com/u/Jeff_Hager)
#### Post date: [September 14, 2021, 5:08pm UTC](https://community.glideapps.com/t/fetch-column/31731/24 "2021-09-14T17:08:24Z")

</div>

> [@gvalero](#):
>
> This will apply in cases where I want to retrieve more than 4-5 values from JSON payload.

David’s JSON Transform column would do that. You pull in the entire JSON string which contains all of the values, and then pick out what you need using the transform column, just like you can with an array and single value columns. The JSON Transform is a lot safer since you don’t need to assume the position of data in the JSON strings. Instead it queries it like an object, as opposed to reading through it like an array. You can still perform a single api call to get the entire json, but have as many transform columns as you need to parse out the data you need.

---

<div class="post-metadata">

### Author: ![gvalero](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/gvalero/32/1037_2.png) [@gvalero](https://community.glideapps.com/u/gvalero)
#### Post date: [September 14, 2021, 5:28pm UTC](https://community.glideapps.com/t/fetch-column/31731/25 "2021-09-14T17:28:53Z")

</div>

Yes!.. thinking it better, one can put several values separated by comma or slash and get an array using a Split Text column later:  
E.g:

`.[0].lat + "/" + .[0].lon + "/" + .[0].temp + "/" + .[1].temp + "/" + .[1].cityname`

 ![image](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/7/f/7f48de308f873bc55fde06f906a00b35517f3447.png)

Saludos!

---

<div class="post-metadata">

### Author: ![Jeff\_Hager](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/jeff_hager/32/43_2.png) [@Jeff\_Hager](https://community.glideapps.com/u/Jeff_Hager)
#### Post date: [September 14, 2021, 5:33pm UTC](https://community.glideapps.com/t/fetch-column/31731/26 "2021-09-14T17:33:15Z")

</div>

Ahh, I see what you’re saying. Yeah, that would work pretty good. You still have control over the number of elements in the array and what they are. That’s simpler than having several EC columns.

---

<div class="post-metadata">

### Author: ![Robert\_Petitto](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/robert_petitto/32/25193_2.png) [@Robert\_Petitto](https://community.glideapps.com/u/Robert_Petitto)
#### Post date: [September 14, 2021, 5:44pm UTC](https://community.glideapps.com/t/fetch-column/31731/27 "2021-09-14T17:44:39Z")

</div>

This was a helpful read:

> **[Reshaping JSON with jq | Programming Historian](https://programminghistorian.org/en/lessons/json-and-jq)**
>
> Working with data from an art museum API and from the Twitter API, this lesson teaches how to use the command-line utility \_jq\_ to filter and parse complex JSON files into flat CSV files.

---

<div class="post-metadata">

### Author: ![Rogelio](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/rogelio/32/1054_2.png) [@Rogelio](https://community.glideapps.com/u/Rogelio)
#### Post date: [September 15, 2021, 4:58am UTC](https://community.glideapps.com/t/fetch-column/31731/28 "2021-09-15T04:58:49Z")

</div>

Tried to get this working with the [Google Places API Autocomplete](https://developers.google.com/maps/documentation/places/web-service/autocomplete) but it errors, even though using the same URL in a browser returns a result, any ideas?

 ![image](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/1/5/156d15351880a808e340866d57a4e4a0e8c53b20.png)

 ![image](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/d/7/d738c28e11e93506e1973f6b3bbffedeee6f633d.png)

`Google Places URL` works in the browser:

 ![image](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/d/c/dc28350a04f4c305aa22f38e3f4aaed9d144748f.png)

---

<div class="post-metadata">

### Author: ![Purvang\_Joshi](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/purvang_joshi/32/12645_2.png) [@Purvang\_Joshi](https://community.glideapps.com/u/Purvang_Joshi)
#### Post date: [September 15, 2021, 6:31am UTC](https://community.glideapps.com/t/fetch-column/31731/29 "2021-09-15T06:31:04Z")

</div>

Thanks a lot. 😇  
Successfully fetched 3000 Street Addresses from Coordinates.

---

<div class="post-metadata">

### Author: ![Purvang\_Joshi](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/purvang_joshi/32/12645_2.png) [@Purvang\_Joshi](https://community.glideapps.com/u/Purvang_Joshi)
#### Post date: [September 16, 2021, 7:52am UTC](https://community.glideapps.com/t/fetch-column/31731/30 "2021-09-16T07:52:53Z")

</div>

I’m able to fetch youtube data api v3 from URL and parse.

URL: [https://www.googleapis.com/youtube/v3/videos?id={VIDEO\_ID}&key={API\_KEY}&part=snippet,contentDetails,statistics,status](https://www.googleapis.com/youtube/v3/videos?id=%7BVIDEO_ID%7D&key=%7BAPI_KEY%7D&part=snippet,contentDetails,statistics,status)

For more [Videos &nbsp;|&nbsp; YouTube Data API &nbsp;|&nbsp; Google Developers](https://developers.google.com/youtube/v3/docs/videos#properties)

---

<div class="post-metadata">

### Author: ![Robert\_Petitto](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/robert_petitto/32/25193_2.png) [@Robert\_Petitto](https://community.glideapps.com/u/Robert_Petitto)
#### Post date: [September 19, 2021, 9:42pm UTC](https://community.glideapps.com/t/fetch-column/31731/31 "2021-09-19T21:42:45Z")

</div>

# More fun with Fetch!

LinkPreview API to grab featured title, description and image from any URL and display it in app:  
https://www.loom.com/embed/77a584e638e94fe48d7eb1539ead986e

---

<div class="post-metadata">

### Author: ![Mns\_Glide](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/mns_glide/32/2514_2.png) [@Mns\_Glide](https://community.glideapps.com/u/Mns_Glide)
#### Post date: [September 21, 2021, 10:01am UTC](https://community.glideapps.com/t/fetch-column/31731/32 "2021-09-21T10:01:04Z")

</div>

I also getting the same error…any help on this?

---

<div class="post-metadata">

### Author: ![ThinhDinh](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/thinhdinh/32/49_2.png) [@ThinhDinh](https://community.glideapps.com/u/ThinhDinh)
#### Post date: [September 21, 2021, 10:12am UTC](https://community.glideapps.com/t/fetch-column/31731/33 "2021-09-21T10:12:11Z")

</div>

It’s likely a CORS problem. I faced this many times and haven’t found out a way to get pass it.

---

<div class="post-metadata">

### Author: ![Mns\_Glide](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/mns_glide/32/2514_2.png) [@Mns\_Glide](https://community.glideapps.com/u/Mns_Glide)
#### Post date: [September 21, 2021, 10:51am UTC](https://community.glideapps.com/t/fetch-column/31731/34 "2021-09-21T10:51:20Z")

</div>

I have just read on CORS and it is beyond me. Maybe @david can help?

I also find it strange when I forked David’s GitHub, published the page and use it, I get this error below. ![errorforked](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/8/4/84fd8fe1ebddc8bf199c98ca6ed5cf85f259061b.jpeg)

---

<div class="post-metadata">

### Author: ![Mns\_Glide](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/mns_glide/32/2514_2.png) [@Mns\_Glide](https://community.glideapps.com/u/Mns_Glide)
#### Post date: [September 22, 2021, 8:03am UTC](https://community.glideapps.com/t/fetch-column/31731/35 "2021-09-22T08:03:19Z")

</div>

@ThinhDinh any insight of how to make this fetch column work? based as it is I have seen it worked twice…meaning I saw the values properly populated.  
@Robert_Petitto was there any settings you did different to avoid the errors we had? I followed the video closely, but to no avail.

Thanks

---

<div class="post-metadata">

### Author: ![ThinhDinh](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/thinhdinh/32/49_2.png) [@ThinhDinh](https://community.glideapps.com/u/ThinhDinh)
#### Post date: [September 22, 2021, 8:41am UTC](https://community.glideapps.com/t/fetch-column/31731/36 "2021-09-22T08:41:59Z")

</div>

It’s Github, so I assume you followed @Darren_Murphy’s guide to publish those Gits?

---

<div class="post-metadata">

### Author: ![Mns\_Glide](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/mns_glide/32/2514_2.png) [@Mns\_Glide](https://community.glideapps.com/u/Mns_Glide)
#### Post date: [September 22, 2021, 9:39am UTC](https://community.glideapps.com/t/fetch-column/31731/37 "2021-09-22T09:39:33Z")

</div>

yes I did publish.

but even using David’s link, I have only seen system able to pull in the right data twice.

---

<div class="post-metadata">

### Author: ![Mns\_Glide](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/mns_glide/32/2514_2.png) [@Mns\_Glide](https://community.glideapps.com/u/Mns_Glide)
#### Post date: [September 22, 2021, 9:43pm UTC](https://community.glideapps.com/t/fetch-column/31731/38 "2021-09-22T21:43:18Z")

</div>

I started a new Glide Table (GT) to test and it is working fine. I think I tested using the Users GT and due to the fact that I had a lot of users, the amount of data it was trying to pull in may have upset the system. 🤠 🤠

---

<div class="post-metadata">

### Author: ![david](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/david/32/62831_2.png) [@david](https://community.glideapps.com/u/david)
#### Post date: [September 22, 2021, 10:43pm UTC](https://community.glideapps.com/t/fetch-column/31731/39 "2021-09-22T22:43:52Z")

</div>

Not all APIs can be fetched in the way this column works. They need to allow cross-origin requests.

---

<div class="post-metadata">

### Author: ![Robert\_Petitto](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/robert_petitto/32/25193_2.png) [@Robert\_Petitto](https://community.glideapps.com/u/Robert_Petitto)
#### Post date: [September 23, 2021, 12:11am UTC](https://community.glideapps.com/t/fetch-column/31731/40 "2021-09-23T00:11:26Z")

</div>

Right. For example, Payhere doesn’t work unfortunately

[Previous page](https://community.glideapps.com/t/fetch-column/31731.md?page=1)

[Next page](https://community.glideapps.com/t/fetch-column/31731.md?page=3)
