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

[
   {
      "@value":{
         "recordID":"353055544971362306",
         "moduleID":"353048633781780482",
         "values":[
            {
               "name":"esd_identificador",
               "value":"30"
            },
            {
               "name":"name",
               "value":"Tolima"
            },
            {
               "name":"country_id",
               "value":"353053974657564674"
            }
         ],
         "namespaceID":"352982316953370627",
         "ownedBy":"352982210434826243",
         "createdAt":"2023-09-02T14:51:43Z",
         "createdBy":"352982210434826243"
      },
      "@type":"ComposeRecord"
   }
]

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.

1 Like