0

我有这个 ko 模型,我使用 ko.mapping.fromJSON() 在下面填充这个 json。我正在使用模板遍历 json,我想知道如何能够删除特定 ProceduresToModalityList 节点中的项目。任何见解或帮助将不胜感激,谢谢!

function ModalityListViewModel() {
        var self = this;
        self.listModalities = ko.observable();

}


[{
    "Id": 1,
    "PayerID": 5,
    "UserID": 0,
    "Name": "ciby1",
    "Description": "blah",
    "UserCreated": "2",
    "UserModified": "2",
    "DateCreated": "2013-06-20T22:42:47",
    "DateModified": null,
    "ProceduresToModalityList": [{
        "Id": 10,
        "UserID": 0,
        "ModalityID": 1,
        "ModalityName": "ciby1",
        "ProcedureID": 1000,
        "ProcedureCode": "15157",
        "ProcedureDescription": "Tissue cultured skin autograft face scalp eyelids mouth neck ears orbits genitalia hands feet and/or multiple digits each additional 100 sq cm or each additional 1% of body area of infants and children or part thereof (List separately i",
        "UserCreated": "cibydev1",
        "UserModified": "",
        "DateCreated": "2013-06-28T16:10:24",
        "DateModified": null,
        "ErrorMessage": ""
    }],
    "IsActive": true,
    "ErrorMessage": null
}, {
    "Id": 2,
    "PayerID": 5,
    "UserID": 0,
    "Name": "ciby2",
    "Description": "blah",
    "UserCreated": "2",
    "UserModified": "2",
    "DateCreated": "2013-06-20T22:52:37",
    "DateModified": null,
    "ProceduresToModalityList": [],
    "IsActive": true,
    "ErrorMessage": null
}, {
    "Id": 5,
    "PayerID": 5,
    "UserID": 0,
    "Name": "ciby3",
    "Description": "blah",
    "UserCreated": "cibydev1",
    "UserModified": "cibydev1",
    "DateCreated": "2013-06-20T22:59:07",
    "DateModified": null,
    "ProceduresToModalityList": [],
    "IsActive": true,
    "ErrorMessage": null
}]
4

0 回答 0