I am stuck in this situation.
I have an array with key tags[$in] and I want to delete this item by its key in Angular (Typescript).
I have a code where I was trying to delete this by delete params?['tags[$in]']; but this is error and I cannot use delete params.tags[$in] because of special characters in key name and I also cannot use delete params['tags[$in]'] because params is possibly undefined;
listSearch<T = Response<any>>(params?: { [key: string]: any }): Observable<T> {
if (params?.search == undefined){
...
}
const paramss = qs.stringify(params, { encode: false });
return this.http.get<T>(`${this.baseURL}/stores?${paramss}`, {
headers: this.http_headers,
withCredentials: true,
responseType: 'json',
});
}
variable params is:
$limit: 12
$skip: 0
status: "active"
tags[$in]: (555) ["5dcbdd558b435f0505beeaf9", "5dcbdd558b435f0505beeafa", …]
type: "branch"
__proto__: Object
So what to use in line 3 of code to delete this parameter by its key tags[$in] from an array?