How can I get Number of Records in a JSON Data

I am fetching data from Airtable using API and the Web Component. So, the data is in JSON format. Now I want to know the number of records in that data. I am using the JSON Extension. Please help me with this…

Which JSON extension?

The Extension is JsonUtils

One more thing, could you give me an example json so that I would know how the structure looks?

Okay, I want to create a List. I have provided all the List in the Airtable. So If I have 10 lists in the Database. I will dynamically create 10 lists in my app. So How will I get the number of List or records which I have provided in the Database? But I don’t want to use the Airtable Component, I will use the API and the Web Component. I hope you got the Point…

See an example here

{
    "records": [
        {
            "id": "rec0kNhBSfBZ6uA6n",
            "fields": {
                "Name": "dora",
                "phone number": "(999)-999999999"
            },
            "createdTime": "2021-05-19T15:04:11.000Z"
        },
        {
            "id": "recHGhMXZmOXTWcVO",
            "fields": {
                "Name": "mary",
                "phone number": "(333_-333333333"
            },
            "createdTime": "2021-05-20T08:19:23.000Z"
        },
        {
            "id": "reccud1wpNW0tXS5H",
            "fields": {
                "Name": "john",
                "phone number": "(444)-555555555"
            },
            "createdTime": "2021-05-20T08:19:33.000Z"
        },
        {
            "id": "receINv0BO2xtKGSp",
            "fields": {
                "Name": "nick",
                "phone number": "(666)-999999999"
            },
            "createdTime": "2021-05-20T08:19:35.000Z"
        }
    ]
}
2 Likes

According to this, you can get the records array and use the arraylength method.

2 Likes

thank you very much it worked…

1 Like

I hope instead of using JSON array method, if you use this , you can see the few sec speed up the process. Earlier me too used JSON array only but after this I forget it due to simple blocks .

Agree, I also prefer the build-in dictionary blocks, as it is easier and has much more features.

3 Likes

Me too, I also prefer to work with dictionaries

1 Like

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