Hi,
I have a textfield where I can select the required asset from DAM
I guess you are referring to pathfield not textfield. Now need to do this with listeners. below is the code you can use. It works for me
Make sure you have two field with
1.Pathfield : where you will select path
2.Tag input field with name ./tags
Here is what dialogs looks like

Here is the output

Here is js Listener code you need to use
function(d) { path = this.value+"/jcr:content/metadata.json"; var x = CQ.shared.HTTP.eval(path); var tags = []; tags = x['cq:tags']; dialog = this.findParentByType('dialog'); field = dialog.getField('./tags'); field.setValue(tags); }Let me know if you face any issue.