# Specific object retrieval from JSON

**URL:** <https://community.thunkable.com/t/specific-object-retrieval-from-json/103714>\
**Category:** Questions about Thunkable X\
**Created:** [June 13, 2019, 1:01am UTC](https://community.thunkable.com/t/specific-object-retrieval-from-json/103714 "2019-06-13T01:01:41Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![Abanoub\_Gallah](https://avatars.discourse-cdn.com/v4/letter/a/ea5d25/32.png) [@Abanoub\_Gallah](https://community.thunkable.com/u/Abanoub_Gallah)\
**Post date:** [June 13, 2019, 1:01am UTC](https://community.thunkable.com/t/specific-object-retrieval-from-json/103714/1 "2019-06-13T01:01:41Z")

</div>

Hello, how do I retrieve a specific object from JSON from a specified number location?  
For example in this JSON link: [https://api.openbrewerydb.org/breweries?by\_type=micro&per\_page=50](https://api.openbrewerydb.org/breweries?by_type=micro&per_page=50) How do I get the FIRST ‘name’ only?

---

<div class="post-metadata">

**Author:** ![domhnallohanlon](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/domhnallohanlon/32/29554_2.png) [@domhnallohanlon](https://community.thunkable.com/u/domhnallohanlon)\
**Post date:** [June 13, 2019, 10:00am UTC](https://community.thunkable.com/t/specific-object-retrieval-from-json/103714/2 "2019-06-13T10:00:18Z")

</div>

Hey @Abanoub_Gallah,

I’d recommend watching @simran’s tutorial on the WebAPI component as they explain how to do this.

This tutorial gives an overview of accessing elements by property name and by position in a list:

[![](https://img.youtube.com/vi/g0RyUbOxlm0/maxresdefault.jpg "Thunkable Web API Component: Countries Info App - Part 2 [Snap to Place]") ](https://www.youtube.com/watch?v=g0RyUbOxlm0)

While this one give a more general intro to the WebAPI componet:

[![](https://img.youtube.com/vi/rUnWhwHHmO4/maxresdefault.jpg "Thunkable Web API Component [Snap to Place]") ](https://www.youtube.com/watch?v=rUnWhwHHmO4)

/  
FInally, based on the API you are using, I’m guessing that you’re following @darren’s tutorials too, right?

> [@Maps Component Example (with video)](http://community.thunkable.com/t/maps-component-example-with-video/73867):
>
> Background As I mention in the video, I think the maps component is a very impressive piece of Thunkable that may not be used to its full potential. As a part of recent Web API series I did, I wanted to display the location of a brewery based on the latitude and longitude provided by the Web API. This tutorial shows you how I did that. Tutorial Docs [https://docs.thunkable.com/map](https://docs.thunkable.com/map) In Closingsmall_blue_diamondlarge_blue_circlelarge_blue_diamondlarge_blue_circlelarge_blue_diamond…

---

<div class="post-metadata">

**Author:** ![Abanoub\_Gallah](https://avatars.discourse-cdn.com/v4/letter/a/ea5d25/32.png) [@Abanoub\_Gallah](https://community.thunkable.com/u/Abanoub_Gallah)\
**Post date:** [June 13, 2019, 1:37pm UTC](https://community.thunkable.com/t/specific-object-retrieval-from-json/103714/3 "2019-06-13T13:37:55Z")

</div>

I tried this code block, but didn’t work, what should I do? I just want the first name to be displayed

 ![40%20PM](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/1/8/18a67be76452da02a2df7979072edbedb9986737.png)

---

<div class="post-metadata">

**Author:** ![Abanoub\_Gallah](https://avatars.discourse-cdn.com/v4/letter/a/ea5d25/32.png) [@Abanoub\_Gallah](https://community.thunkable.com/u/Abanoub_Gallah)\
**Post date:** [June 13, 2019, 9:31pm UTC](https://community.thunkable.com/t/specific-object-retrieval-from-json/103714/4 "2019-06-13T21:31:31Z")

</div>

@domhnallohanlon I figured out a way to get the first ‘name’ but the problem is then switches to the second ‘name’ in the list how is that??

---

<div class="post-metadata">

**Author:** ![darren](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/darren/32/69854_2.png) [@darren](https://community.thunkable.com/u/darren)\
**Post date:** [June 14, 2019, 4:26pm UTC](https://community.thunkable.com/t/specific-object-retrieval-from-json/103714/5 "2019-06-14T16:26:10Z")

</div>

@Abanoub_Gallah It looks like you are doing things out of order. You need to get the first element from the json list and then get the name property.

Here’s an example from my [Brewbase API project cheatsheet](https://xtutorials.io/brewbase-guide):

 ![10%20AM](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/1/6/163922dc89be463f6ad2a4641cc7ae5f64465f5d.jpeg)

---

<div class="post-metadata">

**Author:** ![Abanoub\_Gallah](https://avatars.discourse-cdn.com/v4/letter/a/ea5d25/32.png) [@Abanoub\_Gallah](https://community.thunkable.com/u/Abanoub_Gallah)\
**Post date:** [June 14, 2019, 11:42pm UTC](https://community.thunkable.com/t/specific-object-retrieval-from-json/103714/6 "2019-06-14T23:42:25Z")

</div>

Great! Thank you @darren for your reply. I found a way in which I click on the # in the list and choose ‘first’ this method gets only the first object from JSON.  
Edit: I tried the method you replied, it also has the same problem. The thing is I use the same JSON link in two screens to get different attributes from the first element. One(screen) gets me the first element and the other(screen) gets me the second element.

---

<div class="post-metadata">

**Author:** ![darren](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/darren/32/69854_2.png) [@darren](https://community.thunkable.com/u/darren)\
**Post date:** [June 15, 2019, 5:12pm UTC](https://community.thunkable.com/t/specific-object-retrieval-from-json/103714/7 "2019-06-15T17:12:34Z")

</div>

I can’t tell if you are asking another question or saying your problem is solved? 🤔

---

<div class="post-metadata">

**Author:** ![Abanoub\_Gallah](https://avatars.discourse-cdn.com/v4/letter/a/ea5d25/32.png) [@Abanoub\_Gallah](https://community.thunkable.com/u/Abanoub_Gallah)\
**Post date:** [June 18, 2019, 10:31pm UTC](https://community.thunkable.com/t/specific-object-retrieval-from-json/103714/8 "2019-06-18T22:31:36Z")

</div>

Thank you @darren I solved the problem.

---

<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, 12:13pm UTC](https://community.thunkable.com/t/specific-object-retrieval-from-json/103714/9 "2024-11-08T12:13:23Z")

</div>


