Array of attachment type - how to get a filename for highlighted fragment?

Hi, how to get a filename for highlighted fragment in attachment field?
I found the question on stack overflow, which describes my problem:

But, the question is not an acceptable response.