I'm adding fields to array:
{% for item in content.field_notes | field_target_entity %}
{% set field_component_pages = item.field_component_pages|view|number_format %}
{% endfor %}
In my scenario the value of item.field_component_pages|view is equal "16", but when I convert it to number with number_format I get value of 1.
I presume the item.field_component_pages|view
is not a real value. How can I access field field_component_pages correctly in this case?