Context vars for form data in body transform

I’ve use context vars in request body transform template, because I want to convert my old request body parameter that used form data to json, but I just getting error result when try to test with <no value> message. Also, i’ve enabled context variables in the advance option. This an example:

I input this to request body
{
“foo”: “{{ index ._tyk_context.request_data.foo }”
}

and try to test with this
{
“foo” : “1234567891234567”
}

and getting this :
template: test:2:16: executing “test” at <index ._tyk_context.request_data.foo>: error calling index: index of untyped nil

also if I delete the index, the response will be :
{
“foo”: " "
}

Hope for any assistance. Thank you.