您可以直接从每个模型中删除disabled
和error
键,而不是遍历每个模型的键和值:
Object.entries(myObject.initialState.models).forEach(([key, value]) => {
delete value.disabled;
delete value.error;
});
标签:删除,value,disabled,嵌套,error,属性,delete
From: https://www.cnblogs.com/snowhite/p/17464109.html