我正在过滤地址数组。类型属性确定地址类别(POSTAL、RES、WORK 等)。我只需要从该数组中过滤 POSTAL 和 RES 地址。
我尝试使用 filer array action ,但它只能采用一个过滤条件。
可以在代码视图中编辑实现多种过滤条件吗?如果是,它的正确语法是什么。
{
"Name": "Douglas Adams",
"Address": [
{
"Type": "POSTALS",
"street_address": "42",
"city": "Milky Way",
"state": "HI"
},
{
"Type": "RES",
"street_address": "1618",
"city": "Golden ratio",
"state": "MA"
},
{
"Type": "BILLING",
"street_address": "1618",
"city": "Golden ratio",
"state": "MA"
}
]
}
Run Code Online (Sandbox Code Playgroud)