You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi. I am starting to use this library (thanks for your work!) and stuggled quite a bit with the getProp() function.
When reading a topic with a value of
{
"state": "OFF",
}
I was expecting to use
var state = getProp(path, "state");
but instead had to use
var state = getProp(path, "val", "state");
to read it correctly. Could be that I missed something in the documentation, or that this is general quirk of mqtt.
Please check and feel free to close if this is the expected behavior. Could also be that this is a thing that could be added to the documentation, if it is expected behavior.
Thanks!
The text was updated successfully, but these errors were encountered:
zustellr
changed the title
getProp() need extra "val" property
getProp() needs extra "val" property
Dec 18, 2021
Hi. I am starting to use this library (thanks for your work!) and stuggled quite a bit with the getProp() function.
When reading a topic with a value of
I was expecting to use
but instead had to use
to read it correctly. Could be that I missed something in the documentation, or that this is general quirk of mqtt.
Please check and feel free to close if this is the expected behavior. Could also be that this is a thing that could be added to the documentation, if it is expected behavior.
Thanks!
The text was updated successfully, but these errors were encountered: