Create a Dictionary Searching App Using the Fetch JSON Plugin

Background

There is a popular showcase on the forums for a dictionary app with 163,819 rows. This utilized the best tricks at the time to create a way to search a dictionary dataset. The biggest issue is the lag between entering in a word and seeing the responses.

What’s New?

Glide has released some awesome new features that allow us to make better more responsive apps. In particular for this app, we now have:

Demo

Dictionary Sample

Tutorial

View Details

#1 - Create an Experimental Code column that uses the Fetch JSON Plugin

image

#2 - Query the Dictionary API with the User Specific search word

https://api.dictionaryapi.dev/api/v2/entries/en/<word>

#3 - Parse the response with the JQ Query

.[].meanings[].definitions[].definition

#4 - Replace this list characters with some HTML

image

#5 - Display the list of definitions!

17 Likes

Cool!!!

I created one for my wife a few weeks ago.

7 Likes

Hey @Robert_Petitto, David changed something to his fetch column and it’s working now. You need to probably change the url.

1 Like

Can you be more specific? What URL? When was it updated? Today? As of yesterday, it still wasn’t working.

The column URL. You can find the new URLs if you are still using the very fist one he posted here. Plugins • Glide

It was updated probably about 2 weeks ago.

It has been working for me ever since.

I had an app in which the fetch was not working I just changed the column URL (I was using the very first one David posted) and started working.

This app uses David’s fetch column and transform JQ

Great work! Thanks for sharing @darren.

2 Likes

I just published my tutorial!

One amazing JQ feature I found

If you leave the list number blank - so

.[].meanings[].definitions[].definition

instead of

.[0].meanings[0].definitions[0].definition

it will return a list of all definitions in the possible paths.

This allows me to display all definitions that are returned instead of just the first definition!

14 Likes

Nicely done—very easy to follow. Nice trick with the HTML formatting.

6 Likes

:fire::fire::fire:

2 Likes

Nice, the problem is, the data is not in sheet’s, so you don’t have control what is showing to the app user, unlike my dictionary app… i have downloaded whole data to my sheet and glide app is managing it.

Could do that now by turning a sheet into an API and then using fetch column. This helped me to achieve that:

7 Likes

Then you have to make your sheet public… is ok for public data…
For private use, i would stick to my method… :wink:

2 Likes

The sheet doesn’t have to be public, but the webapp does.

2 Likes

Ones you use yes column, it will be visible… plus you can’t make copyable template from it

2 Likes

We know Glide documentation on Experimental Column makes it clear that anything on Replit can be accessed by anyone on the internet. However, if we don’t want anybody to be able to have access to our API/secret passwords/tokens, there is way to keep them a secret by creating an environment variable. Replit has a special way of doing that called a .env file. Anything in an .env file is hidden from the rest of the world. Any other file/script is public, except anything stored in the .env file.

This works with the free tier of Replit.

4 Likes

Ok