What is the best way to iterate over response's ids in different request?

Hello.
I have request {{host}}:{{port}}/ that returns me some data

{
  "list": [
        {
        "id": 0
    },
    {
        "id": 125,
    },
    {
        "id": 23,
    },
    ...
   }
 ]
}

Also I have another request {{host}}:{{port}}/id

Is it possible using Postman to iterate over ids in Tests Runner?

Yes it is possible. Use below code in your Request: Test tab to print the ids in the console.

var jsonData = pm.response.json();
var count = jsonData.list.length();
for (var i=0; i < count ; i++){
console.log(jsonData.list[i].id);
}

Thank you.
But the problem is not how to iterate in the current Request but how to call all ID in 2nd Request.

So in 1st Request I get this ID by{{host}}:{{port}}/list
In 2nd I want to iterate over IDs in a single request by {{host}}:{{port}}/{{id}}

I do not want to create N request with variables like {{host}}:{{port}}/{{id_1}}, {{host}}:{{port}}/{{id_2}}, {{host}}:{{port}}/{{id_3}}, etc and using pm.environment.set in 1st Request

@KNikolay Use below code in your Request: Test tab of the first request. (only if you have two requests in your collection. If not use pm.sendRequest( host/port/id request details) refer for more details https://learning.postman.com/docs/postman/scripts/postman-sandbox-api-reference/#pmsendrequest)

var jsonData = pm.response.json();
var count = jsonData.list.length();
pm.environment.set(“idsCount”,count );
var currentIdPosition = pm.environment.get(“idPosition”);
if (count > 0){
if (currentIdPosition == null){
=0;
pm.environment.set(idPosition,currentIdPosition);
}
pm.environment.set(“currentIdValue”,jsonData.list[currentIdPosition].id);
postman.setNextRequest(“REQUEST NAME of host:port/id”);
}

in the testscript of {{host}}:{{port}}/id add below

var idsCount = pm.environment.get(idsCount);
var currentIdPosition = pm.environment.get(idPosition);
if(currentIdPosition !== idsCount-1 ){
postman.setNextRequest(“REQUEST NAME of host:port/list”);
}