problem with set variable on session, need explanation

I am new to gatling
I am trying to loop on json response, find the country code that I am looking for and take the id coressponding the that coutry code.
Sample algorithm:
list.foreach( value => { if (value.coutrycode == “PL”) then store })

on Gatling:

def getOffer() = {
http(“GET /offer”)

.foreach("${offerList}", “item”){

exec(session => {
val itemMap = session(“item”).as[Map[String,Any]]
val countryCodeId = itemMap(“countryCode”)
println(“" + countryCodeId)
// => print all the country code on the list
if (countryCodeId ==“PL”){ // if statement condition
*********”+ itemMap(“offerd”)); // print the id eg : “23”
session.set(“offerId”, itemMap(“offerId”)); // set the id on the session
println("$$$$$$$$$$$$$$" + session(“offerId”)) // verify that th session contains the offerId but is not

When I try to print the session(“offerId”), it’s print “item” and not the offerId.
any explanation of this behaviour please ?

Please read the documentation:

I tried with session(“offerId”).as[String] but I got No attribute named ‘offerId’ is defined’