How to access a data record's name (metadata)?

G'day,

We are using AEP9.2.

I have a series of data records output from a protocol (HTTP Connector > Data From JSON > Flatten Heirachy)

Example JSON is shown below. The Flatten Heirarchy has a Select parameter "/generic/text/*" and it produces a series of data records:

ar: name:"Arabic"; dir: "rtl"
bg: name" "Bulgarian"; dir: "lrt"
...

What I want is to access the data record "names", i.e. the values "ar" and "bg" for the two records above.

I thought this would be available as metadata for the data root of each record but it wasn't there.

How can I obtain these values (using Pilotscript or otherwise)?

Thanks,
Chris.
-----
{"text":{"ar":{"name":"Arabic","dir":"rtl"},"bg":{"name":"Bulgarian","dir":"ltr"},"bs":{"name":"Bosnian","dir":"ltr"},"ca":{"name":"Catalan","dir":"ltr"},"cs":{"name":"Czech","dir":"ltr"},"cy":{"name":"Welsh","dir":"ltr"},"da":{"name":"Danish","dir":"ltr"},"de":{"name":"German","dir":"ltr"},"el":{"name":"Greek","dir":"ltr"},"en":{"name":"English","dir":"ltr"},"es":{"name":"Spanish","dir":"ltr"},"et":{"name":"Estonian","dir":"ltr"},"fa":{"name":"Persian","dir":"rtl"},"fi":{"name":"Finnish","dir":"ltr"},"fr":{"name":"French","dir":"ltr"},"he":{"name":"Hebrew","dir":"rtl"},"hi":{"name":"Hindi","dir":"ltr"},"hr":{"name":"Croatian","dir":"ltr"},"ht":{"name":"Haitian Creole","dir":"ltr"},"hu":{"name":"Hungarian","dir":"ltr"},"id":{"name":"Indonesian","dir":"ltr"},"it":{"name":"Italian","dir":"ltr"},"ja":{"name":"Japanese","dir":"ltr"},"ko":{"name":"Korean","dir":"ltr"},"lt":{"name":"Lithuanian","dir":"ltr"},"lv":{"name":"Latvian","dir":"ltr"},"ms":{"name":"Malay","dir":"ltr"},"mt":{"name":"Maltese","dir":"ltr"},"mww":{"name":"Hmong Daw","dir":"ltr"},"nb":{"name":"Norwegian","dir":"ltr"},"nl":{"name":"Dutch","dir":"ltr"},"otq":{"name":"Querétaro Otomi","dir":"ltr"},"pl":{"name":"Polish","dir":"ltr"},"pt":{"name":"Portuguese","dir":"ltr"},"ro":{"name":"Romanian","dir":"ltr"},"ru":{"name":"Russian","dir":"ltr"},"sk":{"name":"Slovak","dir":"ltr"},"sl":{"name":"Slovenian","dir":"ltr"},"sr-Cyrl":{"name":"Serbian (Cyrillic)","dir":"ltr"},"sr-Latn":{"name":"Serbian (Latin)","dir":"ltr"},"sv":{"name":"Swedish","dir":"ltr"},"sw":{"name":"Kiswahili","dir":"ltr"},"th":{"name":"Thai","dir":"ltr"},"tlh":{"name":"Klingon","dir":"ltr"},"tr":{"name":"Turkish","dir":"ltr"},"uk":{"name":"Ukrainian","dir":"ltr"},"ur":{"name":"Urdu","dir":"rtl"},"vi":{"name":"Vietnamese","dir":"ltr"},"yua":{"name":"Yucatec Maya","dir":"ltr"},"zh-Hans":{"name":"Chinese Simplified","dir":"ltr"},"zh-Hant":{"name":"Chinese Traditional","dir":"ltr"}}}