I am struggling since hours with a really basic job: Catching a simple value out of a JSON object. Not a big deal. I don't know what I am doing wrong...
JSON object passes in by websocket in node (BTW: first time I am using this injection method).
It isn't a JSON object, it is a javascript object. JSON is always a string.
There’s a great page in the docs (Working with messages : Node-RED) 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.
If you still can't get it going in a Change node or Function node then show us what you have tried.
I suggest staying clear of JSONata until you have mastered other techniques.
Yes for these i normally use a switch node and switch on the property of the object and then send that out to different paths for different objects (you get this sort of structure with Tasmota on ESP devices with multiple DS18B20 temp sensors)
I find it much easier to come back in a years time and look at the switch node than try to understand what the Jsonata is doing - i have been struggling for a year or so and still do not use it regularly enough to master it