I am facing the problem of clone of the `mongoose query` object .`Javascript` the copy the one object into another object by `call-by-ref` but in my project there is scenario i need to copy one object into another object by `call-by-value.`

```
    var query=domain.User.find({
            deleted: false,
            role: role
        })

var query1=query;

```

> 
> I have the scenario change in the query object is not reflected in `query1`. I google and try so many way to clone the object but it does't work.The query object is used in another function for pagination and `query1` object is used for count query.
> 
> 
> 

1.I used to Object.clone(query1) error Object.clone is not function
 2.I used Object.assign(query1) but it does't works fine.
 3.I used other so many ways can anybody help me to sort this problem