I have done it using ...qqParam['queryParams'] but is this the right approach?

```js
const qqParam = {};
if (view) {
  qqParam['queryParams'] = { view: view };
}
if (productNumber) {
  qqParam['queryParams'] = { ...qqParam['queryParams'], mode: 'productNumber' }; 
}
```