Data Query to a Input field

Hi,
I would like to get a query from the database which contains my email id and I want to get the reporting manager which is there in “entitlement” database and put it in a input text and using dataset I want to update IN “availed” database. I went through the wixdata.query article I was able to make it in the table but I need it in a input text field

import wixData from ‘wix-data’;
import wixUsers from ‘wix-users’;

$w.onReady(function () {

		let user = wixUsers.currentUser; 
		user.getEmail() 
			.then((email) => { 
				let userEmail = email; // "user@something.com" 
				$w("#email").value = "" + userEmail; 
			}); 
		}); 

export function searchButton_click(event, $w) {
$w(‘#leaveapplication’).show();
wixData.query(‘LM_Entitlement’)
.contains(‘email’, $w(‘#email’).value)
.find()
.then(res => {
let items = res.items;
// UNABLE TO MOVE FROM HERE. I AM GETTING THE OBJECT. CAN’T FIND OUT HOW TO RETRIEVE THAT PARTICULAR ROW FIELD CALLED “RM_EMAIL” AND DISPLAY IT IN THE INPUT TEXT//

		}); 

}

HELP ME OUT

After you get items:
let items = res.items;

items is an array. Probably in your case only containing one item. So you need to retrieve that item:
let item = items[0];

Then you can retrieve the field that you want:
let val = item.rm_email;

Assuming the the Field Key in the collection is rm_email , then val has the value that you want. You can then display it.

Thanks. Got it