I want to get the key and the value of my row for example I have this:

{{ content.field_nom }}

but the out put is:

my field name

my value

My question is how do you get 'my field name' alone and 'my value' alone?


I usually use the node object to render field values and labels seperately.

{{ node.field_nom[0].label }}
{{ node.field_nom[0].value }}

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.