# How to use feeder Array in check jsonPath

**URL:** <https://community.gatling.io/t/how-to-use-feeder-array-in-check-jsonpath/6305>\
**Category:** Gatling (Open-Source)\
**Created:** [November 9, 2021, 3:51am UTC](https://community.gatling.io/t/how-to-use-feeder-array-in-check-jsonpath/6305 "2021-11-09T03:51:17Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Jason\_Aw](https://avatars.discourse-cdn.com/v4/letter/j/bbce88/32.png) [@Jason\_Aw](https://community.gatling.io/u/Jason_Aw)\
**Post date:** [November 9, 2021, 3:51am UTC](https://community.gatling.io/t/how-to-use-feeder-array-in-check-jsonpath/6305/1 "2021-11-09T03:51:17Z")

</div>

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…

---

<div class="post-metadata">

**Author:** ![slandelle](https://dub1.discourse-cdn.com/flex013/user_avatar/community.gatling.io/slandelle/32/4_2.png) [@slandelle](https://community.gatling.io/u/slandelle)\
**Post date:** [November 9, 2021, 7:45am UTC](https://community.gatling.io/t/how-to-use-feeder-array-in-check-jsonpath/6305/2 "2021-11-09T07:45:16Z")

</div>

The documentation explicitly states you cannot use Expression Language inside functions: [https://gatling.io/docs/gatling/reference/current/session/expression\_el/](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”)

---

<div class="post-metadata">

**Author:** ![Jason\_Aw](https://avatars.discourse-cdn.com/v4/letter/j/bbce88/32.png) [@Jason\_Aw](https://community.gatling.io/u/Jason_Aw)\
**Post date:** [November 9, 2021, 7:58am UTC](https://community.gatling.io/t/how-to-use-feeder-array-in-check-jsonpath/6305/3 "2021-11-09T07:58:46Z")

</div>

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  
}  
}  
}  
}  
}
