Parse json to get particular value

Hi there!

I'm struggling to get some info from an mqtt message parsed as json, as I'm unable to retrieve one of the particular values I need to further build a dashboard.
I've made different approaches with no success.


I need to get value "Power" but just the figure, 44

Hope you can help me.


There’s a great page in the docs that will explain how to use the debug panel to find the right path to any data item.

Pay particular attention to the part about the buttons that appear under your mouse pointer when you over hover a debug message property in the sidebar.


Thank you @Steve-Mcl but that was one approach with no success. I've tried many different ones reading different sources and I'm here asking for help, so if you could develop your answer in a more helpful way I'll really appreciate it :wink:


Reading many different posts, I finally set my MQTT Output as "a parsed JSON object" and then with a function (msg.payload = msg.payload.ENERGY.Power
return msg;) sent to Debug outputting "msg.payload".

I get the wanted result but also I get an unexpected error I'm unable figure out where it comes from stating "Invalid JSONata expression: Argument 1 of function "split" does not match function signature"

Do you have a change node with a JSONata expression in your flow? I can't tell unless you share more information.

If you put the mouse over that error message it should show you which node it is coming from

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