Considering the following interface :
interface StateEntry {
[state: string]: {metaState: string}
}
With objects always having the same shape such as :
{NEW: {metaState: "ACTIVE"}}
I have an array of such objects (such as const arr = [state1, state2, state3], how can I directly access the unique state value from arr[0]?
Something as arr[0].state === 'NEW'
I think doing Objects.keys(arr[0])[0] is fairly unelegant.
Should I change the interface ?