hey hello guys
I guess this is a trivial problem, but I just don't get it. I want to store a numbre from a txt file into a variable.
I only have one number in the txt file. I want to store it into "count". The problem with my code is that he don't only stores the number, but also the additional info (see image). When I manually store a number into a variable, it works. See code below: Into "count" I store the payload from the txt file. Into "countertest" I store a number directly.
var counter = {payload: msg.payload};
var count=flow.get('count') || 0;
var countertest=flow.get('countertest') || 4;
flow.set('count', counter);
flow.set('countertest', countertest);
return counter;
[{"id":"20ddb1cc.3f763e","type":"debug","z":"15c97f36.c1cd71","name":"get counter debug","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","statusVal":"","statusType":"auto","x":790,"y":240,"wires":[]}]