# Unable to read data from database

**URL:** <https://community.yellow.ai/t/unable-to-read-data-from-database/1412>\
**Category:** Studio\
**Tags:** builder\
**Created:** [August 19, 2021, 5:22pm UTC](https://community.yellow.ai/t/unable-to-read-data-from-database/1412 "2021-08-19T17:22:30Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![ro1406](https://avatars.discourse-cdn.com/v4/letter/r/8baadc/32.png) [@ro1406](https://community.yellow.ai/u/ro1406)\
**Post date:** [August 19, 2021, 5:22pm UTC](https://community.yellow.ai/t/unable-to-read-data-from-database/1412/1 "2021-08-19T17:22:30Z")

</div>

Hi,  
I am able to build and access the database. But the value returned for a query and stored in a variable is: [object Object].

I am not sure if I am printing the variable incorrectly or if i need to access it in another way. My output statement is: “The response is: {{variables.DBResponse}}”, where DBResponse is the name of my variable.

Any help in the matter on how to store and print results from a query so it doesnt show as [object Object] would be helpful!

Regards,

---

<div class="post-metadata">

**Author:** ![ro1406](https://avatars.discourse-cdn.com/v4/letter/r/8baadc/32.png) [@ro1406](https://community.yellow.ai/u/ro1406)\
**Post date:** [August 19, 2021, 5:51pm UTC](https://community.yellow.ai/t/unable-to-read-data-from-database/1412/3 "2021-08-19T17:51:49Z")

</div>

Nevermind, i have figured it out.  
Looks like you dont index arrays with [] as you normally would… 😂

---

<div class="post-metadata">

**Author:** ![Abhishek\_Pillai](https://yyz1.discourse-cdn.com/flex035/user_avatar/community.yellow.ai/abhishek_pillai/32/201_2.png) [@Abhishek\_Pillai](https://community.yellow.ai/u/Abhishek_Pillai)\
**Post date:** [August 24, 2021, 1:20pm UTC](https://community.yellow.ai/t/unable-to-read-data-from-database/1412/4 "2021-08-24T13:20:14Z")

</div>

HI @ro1406 , Can you explain how did you solve the above query. I am also seeing the same response [Object,Object]

---

<div class="post-metadata">

**Author:** ![Jaya\_Banbah](https://yyz1.discourse-cdn.com/flex035/user_avatar/community.yellow.ai/jaya_banbah/32/554_2.png) [@Jaya\_Banbah](https://community.yellow.ai/u/Jaya_Banbah)\
**Post date:** [August 25, 2021, 6:28am UTC](https://community.yellow.ai/t/unable-to-read-data-from-database/1412/5 "2021-08-25T06:28:46Z")

</div>

hi,

You need to use this syntax to get values from specific columns -  
variables.db response variable name.0.column name

To access different rows, index is mentioned without []…  
Please see this here as well-

> **[Create and access bot variables in UI | yellow.ai](https://docs.yellow.ai/docs/platform_concepts/studio/bot-variables/)**
>
> Three types of variables can be used in our flow:

They have explained how to read API response there.

---

<div class="post-metadata">

**Author:** ![Pratik](https://yyz1.discourse-cdn.com/flex035/user_avatar/community.yellow.ai/pratik/32/69_2.png) [@Pratik](https://community.yellow.ai/u/Pratik)\
**Post date:** [August 25, 2021, 8:43am UTC](https://community.yellow.ai/t/unable-to-read-data-from-database/1412/6 "2021-08-25T08:43:30Z")

</div>

Thank you @Jaya_Banbah for helping fellow community members! 🥳

---

<div class="post-metadata">

**Author:** ![Pratik](https://yyz1.discourse-cdn.com/flex035/user_avatar/community.yellow.ai/pratik/32/69_2.png) [@Pratik](https://community.yellow.ai/u/Pratik)\
**Post date:** [February 23, 2022, 12:37pm UTC](https://community.yellow.ai/t/unable-to-read-data-from-database/1412/7 "2022-02-23T12:37:28Z")

</div>

6 posts were split to a new topic: [Access value from the database](https://community.yellow.ai/t/access-value-from-the-database/1914)
