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?


1 Answer 1


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 and acknowledge that you have read and understand our privacy policy and code of conduct.

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