How to use feeder Array in check jsonPath

So, I have created a feeder.

val trackFeeder = Array(
Map(“trackid” → s"V1"),
Map(“trackid” → s"V2"),
Map(“trackid” → s"A1-A2"),
Map(“trackid” → s"A3-A4"),
Map(“trackid” → s"A5-A6"),
Map(“trackid” → s"A7-A8"),
Map(“trackid” → s"A9-A10"),
Map(“trackid” → s"A11-A12"),
Map(“trackid” → s"A13-A14"),
Map(“trackid” → s"A15-A16"),
Map(“trackid” → s"A17-A18"),
Map(“trackid” → s"A19-A20"),
Map(“trackid” → s"A21-A22"),
Map(“trackid” → s"A23-A24"),
Map(“trackid” → s"A25-A26"),
Map(“trackid” → s"A27-A28"),
Map(“trackid” → s"A29-A30"),
Map(“trackid” → s"A31-A32"),
).circular

And I wanted to check jsonPath by using the feeder.
jsonPath(session=>"$.tracks.${trackid}.representations…bandwidth").findAll.optional.saveAs(“bitrates”)
jsonPath(session=>"$.tracks.${trackid}.segments[-1:].out").find.optional.saveAs(“lastout”)
jsonPath(session=>"$.tracks.${trackid}.segments[-1:].step").find.optional.saveAs(“laststep”)

As I wanted to replace the ${trackid} with V1 in the feeder and so on. I’ve look the documentation. But still lack of info.
Could someone help me with this. Much thanks…

The documentation explicitly states you cannot use Expression Language inside functions: https://gatling.io/docs/gatling/reference/current/session/expression_el/

Moreover, you don’t even need it here.
jsonPath("$.tracks.${trackid}.representations…bandwidth").findAll.optional.saveAs(“bitrates”)

Thank you very much for the reply, apparently you are right about the bitrates part. But how to I retrieve the lastout and laststep from each track with different trackid.
The manifest looks like this. And I wish to get the lastout and laststep of each segment of each trackid.

{
“duration”: 10048,
“growing”: false,
“frameRate”: [
25,
1
],
“sampleRate”: [
48000,
1
],
“resolution”: [
640,
360
],
“pixelAspect”: [
1,
1
],
“tracks”: {
“A1-A2”: {
“channels”: 2,
“timescale”: [
1024,
48000
],
“segments”: [
{
“in”: 0,
“out”: 18750,
“step”: 375,
“stepStructure”: [
{
“in”: 0,
“out”: 46,
“step”: 46
},
{
“in”: 46,
“out”: 375,
“step”: 47
}
]
},
{
“in”: 18750,
“out”: 18842,
“step”: 46
}
],
“representations”: {
“128000”: {
“codec”: “mp4a.40.2”,
“bandwidth”: 128000,
“keyOffset”: 0
}
}
},
“A3-A4”: {
“channels”: 2,
“timescale”: [
1024,
48000
],
“segments”: [
{
“in”: 0,
“out”: 18750,
“step”: 375,
“stepStructure”: [
{
“in”: 0,
“out”: 46,
“step”: 46
},
{
“in”: 46,
“out”: 375,
“step”: 47
}
]
},
{
“in”: 18750,
“out”: 18842,
“step”: 46
}
],
“representations”: {
“128000”: {
“codec”: “mp4a.40.2”,
“bandwidth”: 128000,
“keyOffset”: 0
}
}
},
“A5-A6”: {
“channels”: 2,
“timescale”: [
1024,
48000
],
“segments”: [
{
“in”: 0,
“out”: 18750,
“step”: 375,
“stepStructure”: [
{
“in”: 0,
“out”: 46,
“step”: 46
},
{
“in”: 46,
“out”: 375,
“step”: 47
}
]
},
{
“in”: 18750,
“out”: 18842,
“step”: 46
}
],
“representations”: {
“128000”: {
“codec”: “mp4a.40.2”,
“bandwidth”: 128000,
“keyOffset”: 0
}
}
},
“A7-A8”: {
“channels”: 2,
“timescale”: [
1024,
48000
],
“segments”: [
{
“in”: 0,
“out”: 18750,
“step”: 375,
“stepStructure”: [
{
“in”: 0,
“out”: 46,
“step”: 46
},
{
“in”: 46,
“out”: 375,
“step”: 47
}
]
},
{
“in”: 18750,
“out”: 18842,
“step”: 46
}
],
“representations”: {
“128000”: {
“codec”: “mp4a.40.2”,
“bandwidth”: 128000,
“keyOffset”: 0
}
}
},
“V1”: {
“channels”: 0,
“timescale”: [
1,
25
],
“segments”: [
{
“in”: 0,
“out”: 10025,
“step”: 25
},
{
“in”: 10025,
“out”: 10048,
“step”: 23
}
],
“representations”: {
“2500000”: {
“codec”: “avc1.4D401E”,
“bandwidth”: 2500000,
“keyOffset”: 0
}
}
}
}
}