can you please lease post your example flow?
Because it definitely should work. Here is an example and its output:
[{"id":"11ee8cec.8d0383","type":"inject","z":"f954564f.03e718","name":"","topic":"","payload":"","payloadType":"date","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":1320,"y":3380,"wires":[["97f67fb5.23e3f"]]},{"id":"97f67fb5.23e3f","type":"function","z":"f954564f.03e718","name":"testobject","func":"msg.payload = {\n test1:\"this is\",\n test2:\" a test\",\n test3:true\n};\nreturn msg;","outputs":1,"noerr":0,"x":1480,"y":3380,"wires":[["31f9668e.cb6a7a"]]},{"id":"31f9668e.cb6a7a","type":"switch","z":"f954564f.03e718","name":"","property":"payload.test3","propertyType":"msg","rules":[{"t":"true"}],"checkall":"true","repair":false,"outputs":1,"x":1630,"y":3380,"wires":[["4dba2c7b.7e6e9c","4d30bdd2.f6ff4c"]]},{"id":"4dba2c7b.7e6e9c","type":"debug","z":"f954564f.03e718","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload.test1","targetType":"msg","x":1850,"y":3360,"wires":[]},{"id":"4d30bdd2.f6ff4c","type":"debug","z":"f954564f.03e718","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload.test2","targetType":"msg","x":1850,"y":3400,"wires":[]}]
Johannes