Hi,
In my node-properties, I have defined the property as JSON object:
oneditprepare: function() {
$("#node-input-subscribe").typedInput({
type:"json",
types:["json"]
});
}
This is how I define in HTML:
<label for="node-input-subscribe"><i class="fa fa-spinner"></i> Subscribe</label>
<input type="text" id="node-input-subscribe">
Then I get the input value in my node.js
file as:
RED.nodes.createNode(this,config);
node.config = config;
node.subscribe = config.subscribe;
However when I send node.subscribe
to Node-RED what I get is string
not an object. I am checking via debug
node:
msg : string[8]
"{"service":1453}"
What I am missing here?
Edit: Now I see, in the docs, it is mentioned as
a valid JSON string
So it is not converted, it is a JSON string by default. So, is there any way to get object?