/**
 * 删除属性为空的属性
 * @param {*} obj 
 * @returns 
 */
export const removeProperty = (obj) => {
    Object.keys(obj).forEach(item => {
      if (obj[item] === undefined || obj[item] === null || obj[item] === 'null') delete obj[item]
    })
    return obj
}

/**
 * condition删除为空的属性
 */
export const removePropertyCondition = (condition) => {
    condition.forEach(group => {
        group.items && group.items.forEach(item => {
            removeProperty(item)
            if(item.browserConditionParam) {
                removeProperty(item.browserConditionParam)
            }
        })
    })
    return condition
}