Thanks for the pointers; I've tried updating the code as below
```
.exec(http("datasets")
.get("/api/datasets")
.headers(headers_0("#{api_key}"))
.check(
jmesPath("[].id").saveAs("all_datasets")
))
.pause(1)
.exec(http("Open_dataset")
.get(session => {
println(s" session.attributes:
${session.attributes}")
val random_dataset_id = session("#{all_datasets.random()}").as[Int]
```
This is erroring on: j.u.NoSuchElementException: No attribute named '#{all_datase...
From the print line of session.attributes; I can see
session.attributes: HashMap....., all_datasets -> [140,215, ....
So I think I'm using the wrong way to try and run Gatling Expression Language (EL) Strings against the session?
Thanks