Use a JAVASCRIPT transform instead of the JSON transform:
See:
In the script you can check if uid exists before forwarding the info