I'm developing a site with Drupal 8. I made a custom content type, with a lot of fields; in particular I have a field called "field_categoria_del_libro_presen" that is linked to a taxonomy term. It's possible to specify more than one value. I used kint() to obtain the structure of the node. Here:
field_categoria_del_libro_presen
→array(2)
target_id
1
"1"
2
"4"
I attached the screenshot too.
screenshot How can I get the value "1" and "4" that represent the terms of my taxonomy? Thank you so much in advance. Regards. Valentina
ANOTHER QUESTION UNSOLVED: how can I get the length of the array?