You could use a regular expression to parse it out like this:
k = "function GetParam(name) { var req_var = { a: 'xyz' , b: 'yy.com' , c: 'en' , d:0 , e: 'y'}; }"
variable = k.match(/var\s+req_var\s+=\s+(.*?);/m)[1]
p variable
=> "{ a: 'xyz' , b: 'yy.com' , c: 'en' , d:0 , e: 'y'}"