Obtain first element list of ComposeRecord

Any here can help me.
I need obtain the field name of first element. But I do this records[0] and not work

This is the result of query


Field names are constant, so you should already know what the field name is(based on module configuration), like you showed above your field name is “esd_identificador”.
There is no way to find a field name based on a record value.