How do I use a variable that I got through jQuery?

My code is like this and I'm trying to fill a form field with the result of the jQuery function. But it's not working. What am I doing wrong here? It logs the result to the console fine, including the hash and the array: