I am fetching results using JQuery, I can see the results on the console but can't push it into the dropdown box.
<script type="text/javascript">
RED.nodes.registerType('uni-red',{
category: 'Network',
color: '#baff97',
defaults: {
name: {value:""},
outputs: {value: 1}
},
inputs:1,
outputs:1,
icon: "Cute-Ball-Go-icon.png",
label: function() {
return this.name || "uni-red";
},
labelStyle: function() {
return this.name?"node_label_italic":"";
},
oneditprepare: function() {
let url_base ='http://localhost:8080'
const node = this $.getJSON('http://localhost:8080/service/fa81c7a/TemperatureController/property/CurrentTemperature',
function(data){
const newOp = (`<option>${data}</option>`)
$("#node-input-operation").append(newOp)
})
},
}
);
</script>
After this I have my normal HTML tags in place.