I'm not great on JS, but wouldn't "let app of installedApps" work here?