Accessing data in a query object

Sorry, not very skilled at this

Having run a query on collection I understand you create an object which includes all the matched data and various properties from the line
.then(results => {

I understand that you can establish how many “items” your query has returned by using
let resultsCount = results.totalCount;
for instance

And of course I know what is in the object because it is the data from the dataset that matched the query say Forename, Surname, Address etc. but if I wanted to “extract” a value from that object say the Forename of the first record ( [0]? ), how do you basically go about it

i.e. how do you retrieve data from an object?

@eyfc You can assign a variable via the following syntax:
let Forename = results.items[0].Forename;
let Surname = results.items[0].Surname;
let Address = results.items[0].Address;

Be mindful that Corvid expects data field names (keys) to be the exact spelling of the field key found in the collection manager. In this case, the field name and field key are the same, but they don’t have to be.