UI Dropdown - get result from SQL

I had tried the following, but still unable to output the options. The following is the JSON of the flow:

[{"id":"c0e20345.80304","type":"mui_dropdown","z":"b54c837d.8775b","name":"","label":"","place":"Select Option","group":"c5b665f2.5666e8","order":0,"width":0,"height":0,"passthru":false,"options":[{"label":"","value":"","type":"str"}],"payload":"","topic":"","x":900,"y":90,"wires":[[]]},{"id":"57fcfb43.f66374","type":"function","z":"b54c837d.8775b","name":"select-query","func":"msg.topic=\"SELECT id,location FROM location\";\n//var loc = msg.payload.location;\n//var id = msg.payload.id;\n//msg.options = [{loc:id}];\nreturn msg;","outputs":1,"noerr":0,"x":355,"y":90,"wires":[["76c01968.0365c8"]]},{"id":"d7b758c0.613c58","type":"inject","z":"b54c837d.8775b","name":"","topic":"","payload":"","payloadType":"date","repeat":"","crontab":"","once":true,"onceDelay":0.1,"x":175,"y":90,"wires":[["57fcfb43.f66374"]]},{"id":"76c01968.0365c8","type":"mysql","z":"b54c837d.8775b","mydb":"c64480b2.86566","name":"database","x":525,"y":90,"wires":[["7fa19071.7dece"]]},{"id":"a61bb0c4.66aad","type":"debug","z":"b54c837d.8775b","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","x":910,"y":165,"wires":[]},{"id":"7fa19071.7dece","type":"change","z":"b54c837d.8775b","name":"","rules":[{"t":"set","p":"options","pt":"msg","to":"$.payload.location","tot":"jsonata"}],"action":"","property":"","from":"","to":"","reg":false,"x":710,"y":90,"wires":[["c0e20345.80304","a61bb0c4.66aad"]]},{"id":"c5b665f2.5666e8","type":"mui_group","z":0,"name":"Inari Logo","tab":"64262644.5f27d8","order":1,"disp":false,"width":"4","collapse":false},{"id":"c64480b2.86566","type":"MySQLdatabase","z":"","host":"10.21.11.15","port":"3306","db":"i4inari","tz":""},{"id":"64262644.5f27d8","type":"mui_tab","z":0,"name":"I4Inari","icon":"home","order":1}]

This is what I can see on the debug tab:

image