How to get the data of a specific fields of the results.item?

When I do a query, the results are stored in the results.items array. How I can get a specific fields from this array?

Hello

you use .fieldKey (you can get the key from the database ) for each one of the result items

let res = result.items
// to get the field you use for each item in results
res.forEach((element)=>{
    console.log(element.fieldKey) 
});
// if you have only one item as result you can use:
console.log(res[0].fieldKey) 

Best
Massa

3 Likes

Thanks. I will try this one as well. I used successfully the following and it’s work also "
$w(β€˜#input9’).value = results.items[0].field.key"