Score:1

How to output file upload date (of a file field) in a JSON-view?

bl flag

I have rest_export view to generate json output of nodes. I'm trying to output a the upload date of files in a multivalue filefield, but can't find a solution. I tried to use the "rewrite results" option of the filefield in the view using twig as follows:

{% for item in field_myfiles %} {{ item.entity.timestamp|date("Y-m-d H:i:s") }} {% endfor %}

But it just does not work. Any hints how to achieve this?

I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.