Question: I did not use the sudo when installing doctrine in symfony
So this is what i got.. 

```
The "https://flex.symfony.com/aliases.json" file could not be downloaded: failed to open stream: Connection refused https://flex.symfony.com/aliases.json could not be fully loaded, package information was loaded from the local cache and may be out of date
to fix that i did this curl -XGET https://flex.symfony.com/aliases.json

```

and then i installed composer require symfony/orm-pack composer require --dev symfony/maker-bundle

The problem is that it wont add any db config in the env file....
and when i do the `composer require doctrine`
i get this 

```
Pontuss-MacBook-Air:cauldron_overflow Pontus$ composer require doctrine
Using version ^1.0 for symfony/orm-pack
./composer.json has been updated
Loading composer repositories with package information
Updating dependencies (including require-dev)
Restricting packages listed in "symfony/symfony" to "4.4.*"
Nothing to install or update
Package zendframework/zend-code is abandoned, you should avoid using it. Use laminas/laminas-code instead.
Package zendframework/zend-eventmanager is abandoned, you should avoid using it. Use laminas/laminas-eventmanager instead.
Generating autoload files
34 packages you are using are looking for funding.
Use thecomposer fundcommand to find out more!
ocramius/package-versions:  Generating version class...
ocramius/package-versions: ...done generating version class
Executing script cache:clear [OK]
Executing script assets:install public [OK]
Executing script security-checker security:check [OK]

```

So why wont it add the correct data to my env files?
Please any advice

Answer: 
I believe this is what you want. Your data is structured a little strangely though, so I would like to know on a grander scale what you want this code to do.

```js
const findStudentAttendance = (att, studentName) => {
  return att.find(obj => Object.keys(obj)[0] === studentName)
}

names.forEach(name => {
  console.log(
    findStudentAttendance(attendance, name)
  )
}) /* =>
{ student1: [ 'On Time', 'Late' ] }
{ student2: [ 'Late', 'Late' ] }
{ student3: [ 'On Time', 'Excused' ] }
*/

```
try it

```
let result = attendance.filter(obj => names.includes(Object.keys(obj)[0]))
console.log(result)

```

Use array's method "filter" for getting items. You need get keys of object and take first key. And then you'll can check presence in names array, via array's method "includes"

more information about this methods here:

<https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/includes>

<https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/Filter>