Fetch multiple attachments from one doctype to another?

I successfully fetch single attach image but when it comes to multiple attachments how to fetch multiple image with client script, any examples

also i want to fetch imagd for another doctype print, how can i achieve this ?