deposit: for loop rewrite to $.each

Signed-off-by: Javier Martin Montull <javier.martin.montull@cern.ch>
Reported-by: Yoan Blanc <yoan.blanc@cern.ch>