# \[Solved\] Getting objects from JSON

**URL:** <https://community.thunkable.com/t/solved-getting-objects-from-json/250645>\
**Category:** Questions about Thunkable X\
**Tags:** solved, json\
**Created:** [September 30, 2019, 5:31am UTC](https://community.thunkable.com/t/solved-getting-objects-from-json/250645 "2019-09-30T05:31:42Z")\
**Posts on this page:** 5\
**Page:** 1

<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:** [September 30, 2019, 5:31am UTC](https://community.thunkable.com/t/solved-getting-objects-from-json/250645/1 "2019-09-30T05:31:43Z")

</div>

I am having trouble getting values from this JSON.

Can anyone help me, with how to get the vallue of maxspeed (First occurrence)

`
{
  "version": 0.6,
  "generator": "Overpass API 0.7.55.7 8b86ff77",
  "osm3s": {
    "timestamp_osm_base": "2019-09-27T21:32:02Z",
    "copyright": "The data included in this document is from www.openstreetmap.org. The data is made available under ODbL."
  },
  "elements": [
    {
      "type": "way",
      "id": 110361079,
      "nodes": [
        1357949914,
        147458,
        25508750,
        147456,
        1357949890,
        147454,
        1357949889,
        118893,
        428910226,
        1357949911,
        118894,
        1357949909,
        3625850452
      ],
      "tags": {
        "hazard": "animal_crossing",
        "highway": "motorway",
        "int_ref": "E 20",
        "lanes": "3",
        "lit": "no",
        "maxspeed": "110",
        "maxspeed:variable": "yes",
        "name": "Øresundsmotorvejen",
        "oneway": "yes",
        "ref": "E 20",
        "source:maxspeed": "sign",
        "surface": "asphalt"
      }
    },
    {
      "type": "way",
      "id": 316057646,
      "nodes": [
        411808320,
        408435172,
        1344122132,
        408433893,
        408433892,
        1357949913,
        428910226
      ],
      "tags": {
        "destination": "Malmö",
        "destination:ref": "E20",
        "highway": "motorway_link",
        "oneway": "yes",
        "surface": "asphalt"
      }
    },
    {
      "type": "way",
      "id": 357265310,
      "nodes": [
        3625850454,
        1357949898,
        147451,
        428910363,
        147452,
        1344122133,
        147453,
        1357949895,
        1357949902,
        1357949905,
        147457,
        1357949908,
        147461
      ],
      "tags": {
        "highway": "motorway",
        "int_ref": "E 20",
        "lanes": "3",
        "lit": "no",
        "maxspeed": "110",
        "name": "Øresundsmotorvejen",
        "oneway": "yes",
        "ref": "E 20",
        "source:maxspeed": "sign",
        "surface": "asphalt"
      }
    },
    {
      "type": "way",
      "id": 376150397,
      "nodes": [
        147452,
        3795893622,
        3795893623,
        3795893624,
        3795893625,
        3795893626,
        3795893627
      ],
      "tags": {
        "destination": "Ørestad;Bella Center",
        "destination:symbol": "train_station",
        "highway": "motorway_link",
        "lanes": "1",
        "oneway": "yes"
      }
    }
  ]
}
`

---

<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:** [September 30, 2019, 8:38am UTC](https://community.thunkable.com/t/solved-getting-objects-from-json/250645/2 "2019-09-30T08:38:26Z")

</div>

Hi @Claus_Holbech1,

Have you tried using the [Object](https://docs.thunkable.com/objects) blocks to access the individual values in this array?

---

<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:** [September 30, 2019, 10:32am UTC](https://community.thunkable.com/t/solved-getting-objects-from-json/250645/3 "2019-09-30T10:32:18Z")

</div>

Hi there,

It is easier to understand how to get the value you are looking for when your JSON is formatted properly.  
There are websites that will do this automatically for you.  
[This](https://jsonformatter.curiousconcept.com/) is the first one I found when I looked for such a service online.

We can see that ‘maxspeed’ is inside an object called ‘tags’, and that ‘tags’ is the third element of the list ‘elements’ inside this response.

These blocks will get the value of “maxspeed”:

 ![jsonmaxspeed](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/5/e/5e9637acbcbaea47a9faad2340f8d7ca9a60e346.png)

You can see the app I created with these blocks [here](https://x.thunkable.com/copy/b260d284a05be89f94865c83b6d0a26a).

---

<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:** [October 1, 2019, 9:02am UTC](https://community.thunkable.com/t/solved-getting-objects-from-json/250645/4 "2019-10-01T09:02:11Z")

</div>

Thank you very much, that works fine.

Claus

---

<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:08pm UTC](https://community.thunkable.com/t/solved-getting-objects-from-json/250645/5 "2024-11-08T12:08:48Z")

</div>


