It works fine but I am totally stumped, how do I substitute "brightness":250 to "brightness": 'a value' contained in the incoming msg payload ? like if I inject 100 into the function node the output should = "brightness":100
If your intent is to return a JSON string then you will have to concatenate the incoming payload into the middle of the string using the JS concatenate operator + like so:
Thanks shrickus your first solution works perfectly for me (I swear I tried this solution about 4 hours ago but obviously I must have made some mistake) anyway I can now move on thanks again.