以下Odata查询
https://localhost:8080/odata/AppParams(1F2EE62A-8273-E811-81C6-185E0F9B6D7D)?$expand=AppParamConfigs
我得到了下面的所有AppParamConfigs
,
{
"@odata.context":"https://localhost:8080/odata/$metadata#AppParams/$entity","Id":"1f2ee62a-8273-e811-81c6-185e0f9b6d7d","Name":"A","AppParamConfigs":[
{
"Id":"722fe62a-8273-e811-81c6-185e0f9b6d7d","Name":"ABC","Configuration":"2"
},{
"Id":"732fe62a-8273-e811-81c6-185e0f9b6d7d","Name":"XYZ","Configuration":"3"
}
]
}

现在我想获得Configuration
的{{1}}值(3)?
我在下面试过,但没有工作
"Name":"XYZ"
答案 0 :(得分:0)
尝试
https://localhost:8080/odata/AppParams(1F2EE62A-8273-E811-81C6-185E0F9B6D7D)?$expand=AppParamConfigs&$filter=Name eq 'XYZ'&$select=Configuration
您必须先过滤,然后选择。