How to get field structure for a custom content type? I have created a custom content type (mytest) via the Drupal 8 UI.

The content type contains a list field which has the following key|values:

gp|GP
device|Device


I have tried the following code to retrieve field, but it not there.

$fields = \Drupal::service('entity_field.manager')-&gt;getFieldDefinitions('node', 'mytest');


Does any one know how to retrieve a List field structure?
I have to say sorry, I made a mistake in my other part of code.

$fields = \Drupal::service('entity_field.manager')-&gt;getFieldDefinitions('node', 'mytest');


is correct, it returns all fields belongs to "mytest"