How set environment from reponse?

Write test and need set environment for field countries from response

Try:
pm.test(“Old market id”, () => {
pm.environment.set(“old_market_id”,response.countries)
});

But it’s not work and display countries = null

Response
post

Found answer it’s =>
pm.environment.set(“old_market_id”, response[0].countries)
});