How to find index of a particular item in an array

I have an array in a session variable

{
"stats":
[ 
{"gameid":"B1", "A_Score":90 , "B_Score":45},   
{"gameid":"A23", "A_Score":85 , "B_Score":50}   
 ]
}

How do i write an expression to find index of an item in the array, using the gameid?
This is a static site and this array is stored in a session variable

Thanks

Community Page
Last updated: