Or you can store the value you wish in a context var, then compare then store new to context.
e.g.
[{"id":"5fd04de4.af31e4","type":"inject","z":"30af2d3e.d94ea2","name":"","props":[{"p":"payload.interface","v":"1234","vt":"str"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"one","x":80,"y":1020,"wires":[["10adbeec.549b39"]]},{"id":"10adbeec.549b39","type":"change","z":"30af2d3e.d94ea2","name":"","rules":[{"t":"set","p":"previous","pt":"msg","to":"interface[msg.topic]","tot":"flow"},{"t":"set","p":"output","pt":"msg","to":"$$.previous = $$.payload.interface","tot":"jsonata"},{"t":"set","p":"interface[msg.topic]","pt":"flow","to":"payload.interface","tot":"msg"},{"t":"move","p":"output","pt":"msg","to":"payload","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":340,"y":1100,"wires":[["8384a06e.08c0f"]]},{"id":"65d3e2b3.f75f44","type":"inject","z":"30af2d3e.d94ea2","name":"","props":[{"p":"payload.interface","v":"12345","vt":"str"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"one","x":90,"y":1080,"wires":[["10adbeec.549b39"]]},{"id":"6a3a8b54.81785c","type":"inject","z":"30af2d3e.d94ea2","name":"","props":[{"p":"payload.interface","v":"1234","vt":"str"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"two","x":70,"y":1140,"wires":[["10adbeec.549b39"]]},{"id":"2200c8aa.6da738","type":"inject","z":"30af2d3e.d94ea2","name":"","props":[{"p":"payload.interface","v":"1235","vt":"str"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"two","x":70,"y":1180,"wires":[["10adbeec.549b39"]]},{"id":"8384a06e.08c0f","type":"debug","z":"30af2d3e.d94ea2","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","statusVal":"","statusType":"auto","x":600,"y":1120,"wires":[]}]