Can't append JQuery fetch result in Dropdown Box in HTML nodeRED

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">
            category: 'Network',
            color: '#baff97',
            defaults: {
            name: {value:""},
            outputs: {value: 1}
            icon: "Cute-Ball-Go-icon.png",
            label: function() {
                        return || "uni-red";
            labelStyle: function() {
            oneditprepare: function() {
                let url_base ='http://localhost:8080'
                const node = this    $.getJSON('http://localhost:8080/service/fa81c7a/TemperatureController/property/CurrentTemperature', 
                     const newOp = (`<option>${data}</option>`)


After this I have my normal HTML tags in place.

What is in data? I imagine it's an object since you are calling getJSON.


$("#node-input-operation").append(`<option value="${data.value}">${data.text}</option>`); 

So, on my console I am getting an UUID number from the .get function. Also Can I use node.send() somehow to show the result on nodeRED from script tag?

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.