I have an service that some time return data structure like this
我有一个服务,有一段时间返回这样的数据结构
params:value;
and then sometime return
然后有时候回来
params:[value1, value2];
I want to change if value is String (first case), then delete it and make an empty params:[]. How can I aechive it?
如果value是String(第一种情况),我想更改,然后删除它并创建一个空的参数:[]。我该怎么做?