How to use session variable in formParam???

Hi,
I am new to gatling…In my code I did like this…

.feed(csv(“users100.csv”))
.exec( session => {
val cats=Map(“id”->1,“title”->“Scala”).toString()
session.set(“category”,result)
println( “Details…:” +session)
session
})

And in my post request I want to post that stringy value cats…So I gave like this…

.formParam(“category”, “${cats}”)

And in the console it is giving error like this…

[ERROR] i.g.h.a.HttpRequestAction - No attribute named ‘cats’ is defined

How to do???please help me…
And what that session represents???Is it return value???And please help with this code…

Thanks

http://gatling.io/docs/2.0.2/session/session_api.html#id2

I changed code like that but still in db I am seeing that value…please help me…

Sorry…I am not seeing the value…But my application will take only JSON.stringify() value in javascript…So how to do JSON.stringify in scala???

Try this:

.feed(csv(“users100.csv”))
.exec( session => {
val cats=Map(“id”->1,“title”->“Scala”).toString()

println( “Details…:” +session)
session.set(“category”,result)

})