I believe that @Lupin_III is trying to use {{msg.payload["what you want"] | number: 2}}
which throws the error "TypeError: Cannot read property '|number:2' of undefined".
This does work ok {{msg.payload["what you want"]}}
I also can't find the right syntax to make it work with |number
Yes Colin, exactly.
I can't either find a solution. Maybe it's not possible.
If so, how can I replace the spaces with "_" inside the properties? Since they are quite a lot, I would like to avoid to rename them one by one inside a function node
Thanks
Correct it's not really possible. either you can use the angular filters with the value {{value | number:2}} - OR - you can use a msg property. Internally they use different code paths.
This works: {{msg.payload.what_you_want |number: 2}} (property with no spaces)
This doesn't work: {{msg.payload["what you want"] |number: 2}} (property with spaces)
If you want to try it before the next release of the dashboard, if you go to your .node-red folder and run npm install node-red/node-red-dashboard
that will install it direct from git. Then restart node-red to start using it.
When the next version of node-red-dashboard is released I am not sure if updating from Manage Palette will do it, if not then, again from .node-red folder run npm remove node-red-dashboard npm install node-red-dashboard
and restart node-red.