# How i can get id from json

**URL:** <https://community.thunkable.com/t/how-i-can-get-id-from-json/3242695>\
**Category:** Web API's\
**Tags:** beginner\
**Created:** [October 2, 2024, 10:55am UTC](https://community.thunkable.com/t/how-i-can-get-id-from-json/3242695 "2024-10-02T10:55:45Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![imtiazalizour12193hp](https://avatars.discourse-cdn.com/v4/letter/i/898d66/32.png) [@imtiazalizour12193hp](https://community.thunkable.com/u/imtiazalizour12193hp)\
**Post date:** [October 2, 2024, 10:55am UTC](https://community.thunkable.com/t/how-i-can-get-id-from-json/3242695/1 "2024-10-02T10:55:45Z")

</div>

Can anyone help me, I am new in thunkable, The JSON response code is

```auto
{
    "status": "success",
    "data": {
        "mailbox": "qsirrsr8460@site.com",
        "messages": [
            {
                "subject": "test 2",
                "is_seen": false,
                "from": "Ramos Kelly",
                "from_email": "ramoskelaly@gmail.com",
                "receivedAt": "2022-12-02 20:50:53",
                "id": "x6zQW58YB0oPoqewykXdo32S",
                "attachments": [],
                "content": "content html or text "
            },
            {
                "subject": "subject",
                "is_seen": true,
                "from": "Diaz",
                "from_email": "diaz202@gmail.com",
                "receivedAt": "2022-12-02 20:50:33",
                "id": "286J5Nvyk047VZORpBwGPzoQ",
                "attachments": [
                    {
                        "file": "file.png",
                        "url": "http://site.com/download/286J5Nvyk047VZORpBwGPzoQ/file.png"
                    }
                ],
                "content": "content html or text"
            }
        ]
    }
}

```

I want to get “id” from JSON and display it in text input 2, I tried this but it is not working

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

---

<div class="post-metadata">

**Author:** ![matt\_conroy](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/matt_conroy/32/150843_2.png) [@matt\_conroy](https://community.thunkable.com/u/matt_conroy)\
**Post date:** [October 2, 2024, 1:21pm UTC](https://community.thunkable.com/t/how-i-can-get-id-from-json/3242695/2 "2024-10-02T13:21:59Z")

</div>

Hi imtiazalizour12193hp, welcome to Thunkable! 🎉

Be sure to check out [How to ask Great Questions v2.0](https://community.thunkable.com/t/how-to-ask-great-questions-v2-0/2689983/1), the [Community Guidelines](https://community.thunkable.com/t/community-guidelines/78/8), and our [Getting Started Guide](https://docs.thunkable.com/getting-started/get-started) to make the best of your Thunkable Community experience!

Please check out this great tutorial on [parsing data from JSON by Tatian](https://community.thunkable.com/t/api-json-tutorial-video/1140575). I think you will find it very helpful.

---

<div class="post-metadata">

**Author:** ![joemoukarzel88skm4pi](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/joemoukarzel88skm4pi/32/185210_2.png) [@joemoukarzel88skm4pi](https://community.thunkable.com/u/joemoukarzel88skm4pi)\
**Post date:** [October 3, 2024, 10:09am UTC](https://community.thunkable.com/t/how-i-can-get-id-from-json/3242695/3 "2024-10-03T10:09:56Z")

</div>

I recommend you use [https://jsonpathfinder.com/](https://jsonpathfinder.com/) to find the path of the property.  
Click on Sample, then paste your JSON code in. Then select on the right:

 ![path](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/2/c/2cbe13344de46c7a0b8d2c45f667aab03e209f6e.png)

So in this example, id for the first entry comes up as:  
x.data.messages[0].id  
which in thunkable translates to: data.messages[1].id  
as thunkable indexes from 1 not 0

the second entry would then have property of: data.messages[2].id

---

<div class="post-metadata">

**Author:** ![joemoukarzel88skm4pi](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/joemoukarzel88skm4pi/32/185210_2.png) [@joemoukarzel88skm4pi](https://community.thunkable.com/u/joemoukarzel88skm4pi)\
**Post date:** [October 3, 2024, 10:21am UTC](https://community.thunkable.com/t/how-i-can-get-id-from-json/3242695/4 "2024-10-03T10:21:24Z")

</div>

![sol](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/d/1/d1a8b162ceac381fa07167bffeb8d51cd67a9b0d.jpeg)
