# Sort by City variable

**URL:** <https://community.thunkable.com/t/sort-by-city-variable/2751006>\
**Category:** Web API's\
**Tags:** beginner, help\
**Created:** [December 15, 2023, 5:33am UTC](https://community.thunkable.com/t/sort-by-city-variable/2751006 "2023-12-15T05:33:49Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![emart196q80caf](https://avatars.discourse-cdn.com/v4/letter/e/9fc348/32.png) [@emart196q80caf](https://community.thunkable.com/u/emart196q80caf)\
**Post date:** [December 15, 2023, 5:33am UTC](https://community.thunkable.com/t/sort-by-city-variable/2751006/1 "2023-12-15T05:33:49Z")

</div>

Hello!  
I am currently trying to follow this [Brewbase API tutorial](https://www.youtube.com/watch?v=KdfXafg5lIs&list=PLArgGKS_QtY4DjGqaYiqUd6JIDuAWT1pG) to better understand APIs and this block code in general.

I’ve made it past the first part and have my basic app working, and I’m now trying to get the app to filter Brewery locations by city if the list is longer than 50 results which is detailed in this video.  
I’ve spent the last 2 days trying to fix this issue and just cannot figure out what’s gone wrong. Here is a screen recording of my issue, as well as screenshots of all my code blocks. Thank you so so much for anyone who has the time and is able to help!

Code blocks:

 ![api help](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/1/0/1093f7d896f31638e4148e530f6213ee03883424.png)

Screen recording:

> **[409220450\_6696409473822175\_2642036200624523675\_n.mp4](https://drive.google.com/file/d/1Rz5banHdqeN1y5CrtJvbDT3e2bDEv2Hh/view?usp=sharing)**
>
> Google Drive file.

---

<div class="post-metadata">

**Author:** ![emart196q80caf](https://avatars.discourse-cdn.com/v4/letter/e/9fc348/32.png) [@emart196q80caf](https://community.thunkable.com/u/emart196q80caf)\
**Post date:** [December 15, 2023, 5:37am UTC](https://community.thunkable.com/t/sort-by-city-variable/2751006/2 "2023-12-15T05:37:03Z")

</div>

It wouldn’t let me upload more than one image, I apologize!

---

<div class="post-metadata">

**Author:** ![tatiang](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/tatiang/32/55482_2.png) [@tatiang](https://community.thunkable.com/u/tatiang)\
**Post date:** [December 15, 2023, 7:01am UTC](https://community.thunkable.com/t/sort-by-city-variable/2751006/3 "2023-12-15T07:01:57Z")

</div>

It’s hard to help you troubleshoot this without being able to see the API’s JSON response. Can you either post the full JSON response as text (be sure to format it using the \</\> button in the forums toolbar above the post) or provide the full url to the API Get request on the Results Page screen?

---

<div class="post-metadata">

**Author:** ![emart196q80caf](https://avatars.discourse-cdn.com/v4/letter/e/9fc348/32.png) [@emart196q80caf](https://community.thunkable.com/u/emart196q80caf)\
**Post date:** [December 15, 2023, 3:15pm UTC](https://community.thunkable.com/t/sort-by-city-variable/2751006/4 "2023-12-15T15:15:35Z")

</div>

Yes, here is that url, I figure that might be a bit easier. Thank you so much!!

[https://api.openbrewerydb.org/breweries?by\_type=micro&per\_page=50](https://api.openbrewerydb.org/breweries?by_type=micro&per_page=50)

---

<div class="post-metadata">

**Author:** ![tatiang](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/tatiang/32/55482_2.png) [@tatiang](https://community.thunkable.com/u/tatiang)\
**Post date:** [December 15, 2023, 4:00pm UTC](https://community.thunkable.com/t/sort-by-city-variable/2751006/5 "2023-12-15T16:00:01Z")

</div>

On your Results page, it looks like you’re sorting by brewery name instead of city. Have you tried using the “city” property instead?

---

<div class="post-metadata">

**Author:** ![emart196q80caf](https://avatars.discourse-cdn.com/v4/letter/e/9fc348/32.png) [@emart196q80caf](https://community.thunkable.com/u/emart196q80caf)\
**Post date:** [December 15, 2023, 10:21pm UTC](https://community.thunkable.com/t/sort-by-city-variable/2751006/6 "2023-12-15T22:21:19Z")

</div>

I can definitely use that as a work around instead of the way the tutorial has it, it would save me a lot of frustration, haha. I’m just so confused why that city variable doesn’t seem to be resetting when the search page opens.

Thank you!

---

<div class="post-metadata">

**Author:** ![ioannis](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/ioannis/32/146956_2.png) [@ioannis](https://community.thunkable.com/u/ioannis)\
**Post date:** [November 8, 2024, 1:33pm UTC](https://community.thunkable.com/t/sort-by-city-variable/2751006/7 "2024-11-08T13:33:13Z")

</div>

Closed on November 8, 2024, 1:33pm UTC


