I would think, if payload has only the two keys
["keyOne","keyTwo"] = [$keys($$.payload)]
in property input and is true as rule
e.g.
[{"id":"2cabca371eb27b4e","type":"inject","z":"d1395164b4eec73e","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"{\"keyOne\":false,\"keyTwo\":42}","payloadType":"json","x":90,"y":2200,"wires":[["2461013912501444"]]},{"id":"2461013912501444","type":"switch","z":"d1395164b4eec73e","name":"","property":"[\"keyOne\",\"keyTwo\"] = [$keys($$.payload)]","propertyType":"jsonata","rules":[{"t":"true"}],"checkall":"true","repair":false,"outputs":1,"x":230,"y":2200,"wires":[["51e23011bba3999b"]]},{"id":"fdf90a4bf8ad5b04","type":"inject","z":"d1395164b4eec73e","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"{\"keyOne\":false,\"keyThree\":42}","payloadType":"json","x":90,"y":2240,"wires":[["2461013912501444"]]},{"id":"51e23011bba3999b","type":"debug","z":"d1395164b4eec73e","name":"debug 2460","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","statusVal":"","statusType":"auto","x":410,"y":2200,"wires":[]}]
Or if multiple properties of payload
$count($keys($$.payload)[$ in ["keyOne","keyTwo"]])
and rule == 2
e.g.
[{"id":"2cabca371eb27b4e","type":"inject","z":"d1395164b4eec73e","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"{\"keyOne\":false,\"keyTwo\":42, \"test\":33}","payloadType":"json","x":90,"y":2200,"wires":[["a6629ce22e09cfe9"]]},{"id":"a6629ce22e09cfe9","type":"switch","z":"d1395164b4eec73e","name":"","property":"$count($keys($$.payload)[$ in [\"keyOne\",\"keyTwo\"]])","propertyType":"jsonata","rules":[{"t":"eq","v":"2","vt":"num"}],"checkall":"true","repair":false,"outputs":1,"x":250,"y":2200,"wires":[["51e23011bba3999b"]]},{"id":"5133659df03aee6e","type":"inject","z":"d1395164b4eec73e","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"{\"keyOne\":false,\"keyThree\":42}","payloadType":"json","x":90,"y":2240,"wires":[["a6629ce22e09cfe9"]]},{"id":"51e23011bba3999b","type":"debug","z":"d1395164b4eec73e","name":"debug 2460","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","statusVal":"","statusType":"auto","x":410,"y":2200,"wires":[]}]