# Validating json with numeric keys in postman

**URL:** <https://community.postman.com/t/validating-json-with-numeric-keys-in-postman/29524>\
**Category:** Help Hub\
**Tags:** tests, scripts, json\
**Created:** [November 9, 2021, 7:40am UTC](https://community.postman.com/t/validating-json-with-numeric-keys-in-postman/29524 "2021-11-09T07:40:00Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![jorge.leon](https://sea2.discourse-cdn.com/getpostman/user_avatar/community.postman.com/jorge.leon/32/6344_2.png) [@jorge.leon](https://community.postman.com/u/jorge.leon)\
**Post date:** [November 9, 2021, 7:40am UTC](https://community.postman.com/t/validating-json-with-numeric-keys-in-postman/29524/1 "2021-11-09T07:40:00Z")

</div>

Hello people.  
My api returns the following json:

```auto
{
    "code": 200,
    "status": "success",
    "data": {
        "threatChanges": {
            "229": {
                "1395": {
                    "id": 1395,
                    "value": "-6.50",
                    "color": "",
                    "result": "-6.50",
                    "levelId": "",
                    "dimensionType": 1
                }
            }
        }
    }
}

```

It has numbers in the json levels, but when trying to validate it in postman it does not recognize them.

This is the test:

```auto
pm.test("Validación", function () {
    pm.expect(jsonData.data.threatChanges.229.1395.id).to.eql(1395);
});

```

Postman detects me as an error:

![image](https://us1.discourse-cdn.com/getpostman/original/3X/8/a/8af8860897acb803302125c7254930fbe101c557.png)

How can I perform this validation?

---

<div class="post-metadata">

**Author:** ![danny-dainton](https://sea2.discourse-cdn.com/getpostman/user_avatar/community.postman.com/danny-dainton/32/29401_2.png) [@danny-dainton](https://community.postman.com/u/danny-dainton)\
**Post date:** [April 29, 2025, 3:06pm UTC](https://community.postman.com/t/validating-json-with-numeric-keys-in-postman/29524/2 "2025-04-29T15:06:49Z")

</div>

Closed on April 29, 2025, 3:06pm UTC

Thanks for your post, and sorry we didn’t get to this sooner. This isn’t the experience we want for our users.

Since the post is a bit older, we’re closing it to make room for newer discussions.

You would have needed to use _bracket notation_, to access those keys in the response  
`pm.expect(jsonData.data.threatChanges["229"]["1395"].id).to.eql(1395);`
