Lambda json enhancements

The idea is:

Add some improvements to the lambda JSON input:

  • prettify JSON button (and check the correct syntax of it)
  • change node references to dot notation or use single quotes

My use case:

I work mostly with lambda functions in n8n (we already have about 50 workflows) and the JSON input in this node is awful:

  • no proper formatting (even tab is not working to indent the json keys). Plus sometimes space indents are not copied to the json
  • node reference goes with double quotes and thus the json became broken and I can’t copy it to some online editor.

So my actions are something like these:

  1. write the json structure
  2. add node reference when needed
  3. change it to dot notation/single quotes
  4. copy structure to the online editor
  5. prettify it there (and check for validation issues)
  6. past it to the node again