# \[Solved\] How do I parse JSON Object

**URL:** <https://community.thunkable.com/t/solved-how-do-i-parse-json-object/1140945>\
**Category:** Questions about Thunkable X\
**Tags:** solved, json\
**Created:** [March 4, 2021, 1:06am UTC](https://community.thunkable.com/t/solved-how-do-i-parse-json-object/1140945 "2021-03-04T01:06:03Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![thunkablest5dru](https://avatars.discourse-cdn.com/v4/letter/t/97f17d/32.png) [@thunkablest5dru](https://community.thunkable.com/u/thunkablest5dru)\
**Post date:** [March 4, 2021, 1:06am UTC](https://community.thunkable.com/t/solved-how-do-i-parse-json-object/1140945/1 "2021-03-04T01:06:03Z")

</div>

Hi, I am new here so am afraid I must be doing something wrong but can’t seem to see it, so asking for some help.

I have been trying to access a web-api of my own but it keeps crashing when I try to parse the JSON object which the API returns. I simplified the response so that it was just a single token {“securitytoken”:“AAAAAAAAAAAAAAAAAAAA”} but even this wouldn’t work so I gave up with my api and tried to access the weather api from the tutorials and still it won’t work ☹ .

I have the following code attached to a button press:

 ![image](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/8/c/8cc1b5fc2f0e53b35a66be52c285b2477d13c963.png)

When I run it I get a 200 response code and the whole JSON object shows in the message box - so far so good. However if I plug in the object parsing block the appt just crashes and I get nothing.

It seems pretty simple now but it’s still not working. I have tried looking at the other sample programs but notice they have a slightly different “buildingblock” for the getProperty action so not sure if that is related to it.

Can anyone help? I am tearing my hair out!

---

<div class="post-metadata">

**Author:** ![thunkablest5dru](https://avatars.discourse-cdn.com/v4/letter/t/97f17d/32.png) [@thunkablest5dru](https://community.thunkable.com/u/thunkablest5dru)\
**Post date:** [March 4, 2021, 1:48am UTC](https://community.thunkable.com/t/solved-how-do-i-parse-json-object/1140945/2 "2021-03-04T01:48:57Z")

</div>

I have done some more digging and have the following.

 ![image](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/4/0/40f45bb378669286b5ff3b31fef96f351254fbd6.png)

When I put the response object natively it shows the full response beginning Response=({“coord”:…  
When I put get property main of object get object from json response it shows Response() i.e. it seems blank  
When I put get property temp of object get property main of object get object from json response it crashes.

---

<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:** [March 4, 2021, 1:54am UTC](https://community.thunkable.com/t/solved-how-do-i-parse-json-object/1140945/3 "2021-03-04T01:54:08Z")

</div>

I just posted a tutorial that explains how to parse JSON. I recommend watching it:

> [@API JSON Tutorial (Video)](https://community.thunkable.com/t/api-json-tutorial-video/1140575):
>
> Using APIs in Thunkable and understanding how to parse JSON to get certain data from the API response is both a popular and a difficult aspect of using Thunkable. It’s not so much difficult because of Thunkable but because every API url format is different, every API documentation is different, every JSON response is different, etc. In this video, I spend a lot of time talking you through some best practices. It’s not a quick tutorial because if you rush through setting up an API in Thunkable, …

The “main” property is a container for several other properties. Technically speaking, it’s an object rather than a name:value pair. So what you have is a start but it’s not correct. In the video, I explain how to traverse the JSON hierarchy and find the correct properties and their associated blocks.

---

<div class="post-metadata">

**Author:** ![thunkablest5dru](https://avatars.discourse-cdn.com/v4/letter/t/97f17d/32.png) [@thunkablest5dru](https://community.thunkable.com/u/thunkablest5dru)\
**Post date:** [March 4, 2021, 10:39am UTC](https://community.thunkable.com/t/solved-how-do-i-parse-json-object/1140945/4 "2021-03-04T10:39:07Z")

</div>

@tatiang thanks for responding. I have watched your video and made some changes but still no luck ☹  
I have accessed the api using a web page:

 ![image](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/e/c/ec3c4761cc1ecedb41dc46c6ca9603a50824ccef.png)

I have used the JSON formatter you use to validate it:

 ![image](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/0/9/09e09f064de88e4ac573daf1005826daa4bccaf4.png)

If I execute the following block:

 ![image](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/e/6/e67d753f46ed8849b00eeb1fdfaf7cfcb99deda6.png)

I get this:

 ![image](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/1/5/15bd6a44770da93f9121ee12eb9f5270cb34dd1b.png)

but if I plug in the json extract block as follows:

 ![image](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/f/6/f6380012fe49603f956984e1e98148d1175fe228.png)

The app just crashes and disappears:

 ![image](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/a/a/aa3a954a68884e42f4306a5f6e4a4ab33dffe588.png)

Any other ideas? Anyone?

---

<div class="post-metadata">

**Author:** ![muneer](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/muneer/32/75210_2.png) [@muneer](https://community.thunkable.com/u/muneer)\
**Post date:** [March 4, 2021, 12:04pm UTC](https://community.thunkable.com/t/solved-how-do-i-parse-json-object/1140945/5 "2021-03-04T12:04:28Z")

</div>

You are confusing the system. Avoid using similar block/variable names. Change `Response` to something else such as `responseText`

---

<div class="post-metadata">

**Author:** ![thunkablest5dru](https://avatars.discourse-cdn.com/v4/letter/t/97f17d/32.png) [@thunkablest5dru](https://community.thunkable.com/u/thunkablest5dru)\
**Post date:** [March 4, 2021, 12:15pm UTC](https://community.thunkable.com/t/solved-how-do-i-parse-json-object/1140945/6 "2021-03-04T12:15:05Z")

</div>

@muneer thanks, unfortunately no change:

 ![image](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/9/9/99f5ba635ce561b3b5150b7a0f70c121a311fc11.png)

It works if I remove the object block and crashes if I leave it in

---

<div class="post-metadata">

**Author:** ![Claus\_Holbech1](https://avatars.discourse-cdn.com/v4/letter/c/dbc845/32.png) [@Claus\_Holbech1](https://community.thunkable.com/u/Claus_Holbech1)\
**Post date:** [March 4, 2021, 12:18pm UTC](https://community.thunkable.com/t/solved-how-do-i-parse-json-object/1140945/7 "2021-03-04T12:18:16Z")

</div>

I think there is a general problem with the get object from JSON block.

I got this reply from thunkable support earlier today:

Hi Claus, thanks for reporting this. It seems that the ‘get property of object’ block works fine when working directly with an object, so there may be an issue with the ‘get object from JSON’ block. I’ll ask the team to take a look.

---

<div class="post-metadata">

**Author:** ![thunkablest5dru](https://avatars.discourse-cdn.com/v4/letter/t/97f17d/32.png) [@thunkablest5dru](https://community.thunkable.com/u/thunkablest5dru)\
**Post date:** [March 4, 2021, 12:24pm UTC](https://community.thunkable.com/t/solved-how-do-i-parse-json-object/1140945/8 "2021-03-04T12:24:49Z")

</div>

@Claus_Holbech1 thank, this is great news, kind of 😉 at least I am not going mad.

How do you contact support?

---

<div class="post-metadata">

**Author:** ![Claus\_Holbech1](https://avatars.discourse-cdn.com/v4/letter/c/dbc845/32.png) [@Claus\_Holbech1](https://community.thunkable.com/u/Claus_Holbech1)\
**Post date:** [March 4, 2021, 12:52pm UTC](https://community.thunkable.com/t/solved-how-do-i-parse-json-object/1140945/9 "2021-03-04T12:52:16Z")

</div>

Via online chat from the builder. (I have pro subscription).

---

<div class="post-metadata">

**Author:** ![codeswept](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/codeswept/32/87755_2.png) [@codeswept](https://community.thunkable.com/u/codeswept)\
**Post date:** [March 4, 2021, 1:31pm UTC](https://community.thunkable.com/t/solved-how-do-i-parse-json-object/1140945/10 "2021-03-04T13:31:25Z")

</div>

Mine was working just yesterday, but today it just crashed when I tested it.

---

<div class="post-metadata">

**Author:** ![lamagalhaes](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/lamagalhaes/32/76611_2.png) [@lamagalhaes](https://community.thunkable.com/u/lamagalhaes)\
**Post date:** [March 4, 2021, 2:25pm UTC](https://community.thunkable.com/t/solved-how-do-i-parse-json-object/1140945/11 "2021-03-04T14:25:05Z")

</div>

Same problem here!  
After several tests, the problem is in the “get object from JSON” block.  
The json needed is within some strange another json: {"\_U":0,"\_V":1,"\_W": **{“abc”:123,“teste”:999}** ,"\_X:"null}

---

<div class="post-metadata">

**Author:** ![thunkablest5dru](https://avatars.discourse-cdn.com/v4/letter/t/97f17d/32.png) [@thunkablest5dru](https://community.thunkable.com/u/thunkablest5dru)\
**Post date:** [March 4, 2021, 2:48pm UTC](https://community.thunkable.com/t/solved-how-do-i-parse-json-object/1140945/12 "2021-03-04T14:48:47Z")

</div>

@lamagalhaes How did you discover the extra wrapper?

---

<div class="post-metadata">

**Author:** ![lamagalhaes](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/lamagalhaes/32/76611_2.png) [@lamagalhaes](https://community.thunkable.com/u/lamagalhaes)\
**Post date:** [March 4, 2021, 3:17pm UTC](https://community.thunkable.com/t/solved-how-do-i-parse-json-object/1140945/13 "2021-03-04T15:17:05Z")

</div>

showing an alert: ![image](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/1/2/129fc7f50e59a130e28d10f3093c6569d1ee2e56.png)

---

<div class="post-metadata">

**Author:** ![katy.garnierqlup](https://avatars.discourse-cdn.com/v4/letter/k/b2d939/32.png) [@katy.garnierqlup](https://community.thunkable.com/u/katy.garnierqlup)\
**Post date:** [March 4, 2021, 3:33pm UTC](https://community.thunkable.com/t/solved-how-do-i-parse-json-object/1140945/14 "2021-03-04T15:33:30Z")

</div>

Hey all:

Thunkable tells me there is a bug right now with the getJSON block, so I would avoid it until they publish a fix. I spend many hours and lost a lot of hair to this, and I can’t figure out if this kind of thing is consolidated anywhere in the forums so I thought I’d share.

---

<div class="post-metadata">

**Author:** ![thunkablest5dru](https://avatars.discourse-cdn.com/v4/letter/t/97f17d/32.png) [@thunkablest5dru](https://community.thunkable.com/u/thunkablest5dru)\
**Post date:** [March 4, 2021, 3:35pm UTC](https://community.thunkable.com/t/solved-how-do-i-parse-json-object/1140945/15 "2021-03-04T15:35:32Z")

</div>

Me too! Would be good to have a current bug list somewhere. Any idea how long it might take?

---

<div class="post-metadata">

**Author:** ![lamagalhaes](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/lamagalhaes/32/76611_2.png) [@lamagalhaes](https://community.thunkable.com/u/lamagalhaes)\
**Post date:** [March 4, 2021, 5:00pm UTC](https://community.thunkable.com/t/solved-how-do-i-parse-json-object/1140945/16 "2021-03-04T17:00:24Z")

</div>

it seems to be fixed now!

---

<div class="post-metadata">

**Author:** ![jane](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/jane/32/27575_2.png) [@jane](https://community.thunkable.com/u/jane)\
**Post date:** [March 5, 2021, 9:25am UTC](https://community.thunkable.com/t/solved-how-do-i-parse-json-object/1140945/17 "2021-03-05T09:25:15Z")

</div>

Hi everyone,

I would like to confirm that the issue with the ‘get object from JSON’ block was resolved within a few hours.

Thanks to everyone who reported it!

---

<div class="post-metadata">

**Author:** ![Tommaso](https://avatars.discourse-cdn.com/v4/letter/t/e9c0ed/32.png) [@Tommaso](https://community.thunkable.com/u/Tommaso)\
**Post date:** [March 7, 2021, 5:31pm UTC](https://community.thunkable.com/t/solved-how-do-i-parse-json-object/1140945/18 "2021-03-07T17:31:34Z")

</div>

It appears I still have this problem. It seemed to be solved a few days ago, but now my project crashes again in Thunkable Live.

In particular, I have the issue using the block get object from json.

Anyone still having this issue?

---

<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:** [March 7, 2021, 6:21pm UTC](https://community.thunkable.com/t/solved-how-do-i-parse-json-object/1140945/19 "2021-03-07T18:21:53Z")

</div>

So no API calls are working for you once you try to parse the JSON? Or is it just a particular property?

---

<div class="post-metadata">

**Author:** ![muneer](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/muneer/32/75210_2.png) [@muneer](https://community.thunkable.com/u/muneer)\
**Post date:** [March 7, 2021, 8:19pm UTC](https://community.thunkable.com/t/solved-how-do-i-parse-json-object/1140945/20 "2021-03-07T20:19:28Z")

</div>

To test the previous condition with the `Get object from JSoN` block do the following

 ![image](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/e/d/ed74790d197ad5313e456c03aa9232cb786131f8.png)  
Both Label1 and Label2 should show similar results.

If there is a problem with the `Get object from JSON` block, the second label will show empty curly brackets `{}`.

[Next page](https://community.thunkable.com/t/solved-how-do-i-parse-json-object/1140945.md?page=2)
