# Parsing json file

**URL:** https://community.thunkable.com/t/parsing-json-file/1735584
**Category:** Questions about Thunkable X
**Tags:** beginner
**Created:** [February 15, 2022, 11:46am UTC](https://community.thunkable.com/t/parsing-json-file/1735584 "2022-02-15T11:46:11Z")
**Posts on this page:** 6
**Page:** 1

<div class="post-metadata">

### Author: ![cool.amc777uppm](https://avatars.discourse-cdn.com/v4/letter/c/67e7ee/32.png) [@cool.amc777uppm](https://community.thunkable.com/u/cool.amc777uppm)
#### Post date: [February 15, 2022, 11:46am UTC](https://community.thunkable.com/t/parsing-json-file/1735584/1 "2022-02-15T11:46:11Z")

</div>

Hello, I am trying to parse json file, to get the value of P of the object lastQuote in json file:

```auto
{
 "status": "OK",
 "ticker": {
  "day": {
   "c": 120.4229,
   "h": 120.53,
   "l": 118.81,
   "o": 119.62,
   "v": 28727868,
   "vw": 119.725
  },
  "lastQuote": {
   "P": 120.47,
   "S": 4,
   "p": 120.46,
   "s": 8,
   "t": 1605195918507251700
  },
  "lastTrade": {
   "c": [
    14,
    41
   ],
   "i": "4046",
   "p": 120.47,
   "s": 236,
   "t": 1605195918306274000,
   "x": 10
  },
  "min": {
   "av": 28724441,
   "c": 120.4201,
   "h": 120.468,
   "l": 120.37,
   "o": 120.435,
   "v": 270796,
   "vw": 120.4129
  },
  "prevDay": {
   "c": 119.49,
   "h": 119.63,
   "l": 116.44,
   "o": 117.19,
   "v": 110597265,
   "vw": 118.4998
  },
  "ticker": "AAPL",
  "todaysChange": 0.98,
  "todaysChangePerc": 0.82,
  "updated": 1605195918306274000
 }
}

How should I build the blocks?
```

---

<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: [February 15, 2022, 12:08pm UTC](https://community.thunkable.com/t/parsing-json-file/1735584/2 "2022-02-15T12:08:22Z")

</div>

Welcome to Thunkable.

You need to convert your JSON string to an object and then use the `Get property .... of object ....`.

See this

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

The output would be  
 ![image](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/4/d/4db34ba4b113905eee8f89effd627c7ed49a7167.png)

You can also use the JSON reference format this way which will give the same output.

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

---

<div class="post-metadata">

### Author: ![cool.amc777uppm](https://avatars.discourse-cdn.com/v4/letter/c/67e7ee/32.png) [@cool.amc777uppm](https://community.thunkable.com/u/cool.amc777uppm)
#### Post date: [February 15, 2022, 12:20pm UTC](https://community.thunkable.com/t/parsing-json-file/1735584/3 "2022-02-15T12:20:23Z")

</div>

I tried but the output is null

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

---

<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: [February 15, 2022, 12:27pm UTC](https://community.thunkable.com/t/parsing-json-file/1735584/4 "2022-02-15T12:27:15Z")

</div>

You’re not showing a full blocks which makes it difficult to know the cause.

Try it again. The part you are showing is OK.

---

<div class="post-metadata">

### Author: ![alex\_ezacae](https://avatars.discourse-cdn.com/v4/letter/a/278dde/32.png) [@alex\_ezacae](https://community.thunkable.com/u/alex_ezacae)
#### Post date: [February 15, 2022, 2:41pm UTC](https://community.thunkable.com/t/parsing-json-file/1735584/5 "2022-02-15T14:41:43Z")

</div>

same for me it should be ok.  
are you sure you are entering in the purple block ? (then do ? )  
try to set you label4 with a test string to be sure that you are entering the condition.  
can you share your app ?

---

<div class="post-metadata">

### Author: ![system](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/0/f/0f59f292712368bce16ff80133ae10de8a6f27e8.png) [@system](https://community.thunkable.com/u/system)
#### Post date: [May 16, 2022, 2:42pm UTC](https://community.thunkable.com/t/parsing-json-file/1735584/6 "2022-05-16T14:42:25Z")

</div>

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.
