Hi guys/ladies
I hope you can help me with a problem I am having.
I am struggling to collect a certain value from my collection after I ran a successful search across my collection.
//User types in the Member ID in to a search box (input box)(#Member_ID)
After search runs populate the input boxes with the values of the Member identified by the ID.
wixData.query("Students")
.eq("st_member_id",$w("#Member_ID")
.find().then( (results => {console.log("DB Query Result - "+ JSON.stringify(results.items));
}));
No here is my problem I need to collect from the items a specific column say the name of the student identified.
How would I select only the detail that relates to the the Name key field.
\\This is the result of the collection items. Please note that the information here is fictitious.
DB Query Result - [{"st_insurance_date":"2019-12-30T22:00:00.000Z","st_location":"South Africa","st_member_id":"8910032001081","st_membership":"LT_001","_id":"ad393c72-85ff-4ce7-a863-56064924a44e","_owner":"124cc7d4-d4d0-481e-a532-f5ed20a49a9a","_createdDate":"2019-09-22T14:32:48.433Z","specialty":"Nurse","st_country_of_origin":"London","st_gender":"Female","_updatedDate":"2019-09-22T18:17:26.399Z","st_dob":"1989-10-02T22:00:00.000Z","st_surname":"de Beer","st_name":"Cathrine"}]
Please can you help with a solution