Fichtelgard

Get Value of Object Key/Entry

export async function getKeyValueOfObject(
searchedKey: string,
object?: Object
): Promise {
if (!object) return undefined;
for (let key of Object.entries(object)) {
if (key[0] === searchedKey) {
return key[1];
}
}
return undefined;
}