如何从Json对象下面列出IsDeleted == 0
"currencies":[{
"CurrencyID":"1",
"CurrencyCode":"AED",
"CurrencyName":"United Arab Emirates Dirham",
"IsDeleted":"1"
},{
"CurrencyID":"2",
"CurrencyCode":"AFN",
"CurrencyName":"Afghan Afghani",
"IsDeleted":"1"
},{
"CurrencyID":"3",
"CurrencyCode":"ALL",
"CurrencyName":"Albanian Lek",
"IsDeleted":"1"
}];
<select ng-model="data.CurrencyID" ng-options="cu.CurrencyID as cu.CurrencyName for cu in currencies | filter : IsDeleted :'0'"></select>
答案 0 :(得分:2)
<select ng-model="data.CurrencyID" ng-options="cu.CurrencyID as cu.CurrencyName for cu in currencies |filter : {IsDeleted :'0'}"></select>
答案 1 :(得分:0)
在IsDeleted:'0'中,只需在isDeleted后用“=”运算符替换“:”
<select ng-model="data.CurrencyID" ng-options="cu.CurrencyID as cu.CurrencyName for cu in currencies | filter : IsDeleted = '0'"></select>