Debug node output -- show complete message options

Instead you could use the debug node with a jsonata expression:

$sift(function($v, $k) {$k ~> /^(?!_msgid)/})

Returns everything but _msgid

2 Likes

Any final thoughts?

I have to say that I like the sorted output a lot (I changed it now that payload comes first, then alphabetically the rest which does not start with "" and then all with "", also sorted.
And from a performance perspective, sorting this integer array really has no significant impact compared to all the DOM manipulation that is happening.
The function which creates the debug-output is also used at a different spot in the code, I think for showing differences between flows, I don't know the implications there, but one could make everything optional, of course.

@bakman2 thanks, really cool, but I am looking for a solution that makes life easier and having to type in this all the time (or copying an other debug node) is not the most convenient solution.

my thought at the moment - is does the order matter ? - I know in theory that for objects the order in theory a) shouldn't matter and b) is not guaranteed. BUT this is a debug node - so do users expect it to show them the object as-is ? And when comparing the side bar (to say) the console - would the different order cause confusion ?

1 Like

Hmm, I get the argument. One could also argue along these lines that in modern javascript there are actually rules about preservation of the order which most of the time correspond to the insertion order, so it makes sense to show it that way.

Maybe as an option :slight_smile:

It is also not a huge deal, if I am honest....
It is just, I feel that Node-RED is nearly perfect for me, so finding things it could be improved on tend to be small things and I always felt since now more than 5 years of using Node-RED that debugging is somehow a bit uncomfortable (but also not bad). If you have a node that spits out an object with many properties (happens commonly for rest calls, for example) and you want to find one quickly, a sorted output helps a lot.

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