Question: I am struggling with building a QuerySet to get all objects belonging to the current logged-in user. The bills are assigned to a `Customer`, and `CustomerUser` objects are assigned to the `Customer`:

```
  ┌──────┐      ┌──────────┐
  │ Bill │ ───► │ Customer │
  └──────┘  FK  └──────────┘
                     ▲
                     │
                     │ FK

            ┌──────────────┐
            │ CustomerUser │
            └──────────────┘

                     │
                     │ FK
                     ▼
┌──────────────────────────┐
│ contrib.auth.models.User │
└──────────────────────────┘

```

Models:

```py
class Bill(models.Model):
    date = models.DateField(blank=False)
    total = models.FloatField(blank=False, null=False, default=0.0)
    customer = models.ForeignKey(Customer, null=True, on_delete=models.SET_NULL)

class Customer(models.Model):
    name = models.CharField(max_length=25, blank=False, null=False)

class CustomerUser(models.Model):
    first_name = models.CharField(max_length=30, blank=True, null=True)
    last_name = models.CharField(max_length=30, blank=True, null=True)
    user = models.ForeignKey(User, on_delete=models.CASCADE, blank=True, null=True)

```

Basically I want to craft a QuerySet that returns the `Bill` objects the `CustomerUser` has access to. Can this be done with a single QuerySet?

Answer: 
If you want to change current array use this:

```js
var array=[{a:1, b:false}, {a:2, b:true}, {a:3, b:false}]
array.forEach((obj) => {
   return obj.b = true
})

console.log(array)
```

But if you want still have previous array, try this:

```js
var array=[{a:1, b:false}, {a:2, b:true}, {a:3, b:false}];

const newArray = array.map((obj) => ({ ...obj, b: true }));

console.log(newArray);
```
There are 2 ways you can achieve the result:

1. **Using `forEach`**:

```js
var array=[{a:1, b:false}, {a:2, b:true}, {a:3, b:false}]
array.forEach((obj) => {
   return obj.b = true
})

console.log(array)
```

2. **Using `map`**:

```js
var array=[{a:1, b:false}, {a:2, b:true}, {a:3, b:false}];

const result = array.map((item) => ({ ...item, b: true }));

console.log(result);
```