Another difficult JSON question

I am sure i need to try. list format as i am having an Array to handle.
My Problem is that i dont know how many records the result is producting when i do the request
i only want the “ID” and “Name” from the records added into a list and using “For Each” in Thunkable.

Here is the result i get:

array		[5]
	0		{7}
id	:	102
gid	:	9091001000000102
name	:	Styrsvik
note	:	Runmarö
lat	:	59.2802666088178
lon	:	18.7313783519481
	valid		{1}
from	:	2012-06-23T00:00:00
	1		{7}
id	:	103
gid	:	9091001000000104
name	:	Nämdöböte
note	:	Nämdö
lat	:	59.2088268465829
lon	:	18.7399218125326
	valid		{1}
from	:	2012-06-23T00:00:00
	2		{7}
id	:	104
gid	:	9091001000000104
name	:	Aspö
note	:	vid Nämdö
lat	:	59.2157454470392
lon	:	18.753322503205
	valid		{1}
from	:	2021-02-24T00:00:00
	3		{6}
id	:	105
gid	:	9091001000000104
name	:	Idöborg
lat	:	59.2042855337483
lon	:	18.7576059070945
	valid		{1}
from	:	2012-06-23T00:00:00
	4		{7}
id	:	106
gid	:	9091001000000106
name	:	Östanvik
note	:	Nämdö
lat	:	59.1973533499037
lon	:	18.7400578888828
	valid		{1}
from	:	2012-06-23T00:00:00

and here is the input

[
 {
   "id": 102,
   "gid": 9091001000000102,
   "name": "Styrsvik",
   "note": "Runmarö",
   "lat": 59.2802666088178,
   "lon": 18.7313783519481,
   "valid": {
     "from": "2012-06-23T00:00:00"
   }
 },
 {
   "id": 103,
   "gid": 9091001000000103,
   "name": "Nämdöböte",
   "note": "Nämdö",
   "lat": 59.2088268465829,
   "lon": 18.7399218125326,
   "valid": {
     "from": "2012-06-23T00:00:00"
   }
 },
 {
   "id": 104,
   "gid": 9091001000000104,
   "name": "Aspö",
   "note": "vid Nämdö",
   "lat": 59.2157454470392,
   "lon": 18.7533225032050,
   "valid": {
     "from": "2021-02-24T00:00:00"
   }
 },
 {
   "id": 105,
   "gid": 9091001000000105,
   "name": "Idöborg",
   "lat": 59.2042855337483,
   "lon": 18.7576059070945,
   "valid": {
     "from": "2012-06-23T00:00:00"
   }
 },
 {
   "id": 106,
   "gid": 9091001000000106,
   "name": "Östanvik",
   "note": "Nämdö",
   "lat": 59.1973533499037,
   "lon": 18.7400578888828,
   "valid": {
     "from": "2012-06-23T00:00:00"
   }
  }
 ]

Any ideas someone ?
Appreciate just a guidance…

That result is not JSON. Can you post the full JSON response as text?

Iam afraid i cant. I have no way to catch the result. Its too big so i cant just copy paste it… any other idea

I usually assign the green response block to a text input’s text and then I’m able to copy the response when previewing the app.

I asked ChatGPT 4 “Based on the data provided, what is the likely JSON structure for this API response?” Here’s what it said:

[
    {
        "id": 102,
        "gid": "9091001000000102",
        "name": "Styrsvik",
        "note": "Runmarö",
        "lat": 59.2802666088178,
        "lon": 18.7313783519481,
        "valid": {
            "from": "2012-06-23T00:00:00"
        }
    },
    {
        "id": 103,
        "gid": "9091001000000104",
        "name": "Nämdöböte",
        "note": "Nämdö",
        "lat": 59.2088268465829,
        "lon": 18.7399218125326,
        "valid": {
            "from": "2012-06-23T00:00:00"
        }
    },
    {
        "id": 104,
        "gid": "9091001000000104",
        "name": "Aspö",
        "note": "vid Nämdö",
        "lat": 59.2157454470392,
        "lon": 18.753322503205,
        "valid": {
            "from": "2021-02-24T00:00:00"
        }
    },
    {
        "id": 105,
        "gid": "9091001000000104",
        "name": "Idöborg",
        "lat": 59.2042855337483,
        "lon": 18.7576059070945,
        "valid": {
            "from": "2012-06-23T00:00:00"
        }
    },
    {
        "id": 106,
        "gid": "9091001000000106",
        "name": "Östanvik",
        "note": "Nämdö",
        "lat": 59.1973533499037,
        "lon": 18.7400578888828,
        "valid": {
            "from": "2012-06-23T00:00:00"
        }
    }
]

To get a list of “id” property values, use this code (from the first screen of the project here):

With this result:

Thank you - I normally do the same just to Copy paste and then investigate. But the response is so big i cant copy it… the phone wonte let me. And cant run it in a web version either because of CORS probs.
I guess this list will be 10-15000 items long…
Still i’ll try your example and see how goes…
Thanks for your ideas @tatiang:smiley:

Will the API let you filter the data in order to retrieve a smaller response? For example, Airtable can do this.