Indexing in list of array

Hi Experts,

I have a local variable which store list of array, I need to get the col2 value where col1 is "RF",

Kindly help with the expression as when i tried below expression but its not returning the correct value.

localVariable(

local!a: {{col1: "TX", col2: "Gaurav Singh"}, {col1: "Civil", col2: "Gaurav Singh"}, {col1: "RF", col2: "Gaurav Singh"}},

local!RF:  index(

index(local!rows,"col2",{}),
wherecontains( 

tostring( index( local!rows, "col1", {}  )  ),

 "RF"

),
{}
)
))

Kindly help

  Discussion posts and replies are publicly visible