0

I have an object JSON and i need to filter based on Container Order No. I tried many ways it's not working and is not showing error also.

Here is the Object JSON: This we have to parse using JSON.parse(). For your reference added JSON as it is.

 {
  "collections": {
    "container": {
      "rowset": [
        {
          "containerisarchived": "Null",
          "containerorderno": "52",
          "versionnum": "0",
          "containerglobaluniqueid": "Null",
          "containeristenantbased": "true",
          "containercreatedby": "user",
          "containerisdeleted": "false",
          "containertenantid": "292FEC76-5F1C-486F-85A5-09D88096F098",
          "containerlayoutid": "efde5d9d-2ab9-4b5f-b0f7-0ffa11cbf2b4",
          "containerapplicationid": "0000000-0000-0000-0000-000000000000",
          "containerisactive": "Null",
          "containerheadertext": "Customer29Jan16Obj",
          "containerid": "635f8bbf-2d5b-4268-970c-ba4be432ef7e",
          "containercreatedutcdate": "2016-01-29 18:27:50.0"
        },
        {
          "containerisarchived": "Null",
          "containerorderno": "50",
          "versionnum": "0",
          "containerglobaluniqueid": "Null",
          "containeristenantbased": "true",
          "containercreatedby": "user",
          "containerisdeleted": "false",
          "containertenantid": "292FEC76-5F1C-486F-85A5-09D88096F098",
          "containerlayoutid": "efde5d9d-2ab9-4b5f-b0f7-0ffa11cbf2b4",
          "containerapplicationid": "0000000-0000-0000-0000-000000000000",
          "containerisactive": "Null",
          "containerheadertext": "Null",
          "containerid": "4cfaeea7-9282-4e45-b081-3ded3264cd28",
          "containercreatedutcdate": "2016-01-29 18:27:50.0"
        },
        {
          "containerisarchived": "Null",
          "containerorderno": "51",
          "versionnum": "0",
          "containerglobaluniqueid": "Null",
          "containeristenantbased": "true",
          "containercreatedby": "user",
          "containerisdeleted": "false",
          "containertenantid": "292FEC76-5F1C-486F-85A5-09D88096F098",
          "containerlayoutid": "efde5d9d-2ab9-4b5f-b0f7-0ffa11cbf2b4",
          "containerapplicationid": "0000000-0000-0000-0000-000000000000",
          "containerisactive": "Null",
          "containerheadertext": "Customer29Jan16",
          "containerid": "034d3430-d9da-4bd7-a566-ee3a59b506c2",
          "containercreatedutcdate": "2016-01-29 18:27:50.0"
        }
      ],
      "meta": {
        "parentreference": "layout",
        "pkname": "layoutId",
        "fkname": "containerLayoutId"
      }
    }
  },
  "entityinfo": {
    "timestamp": "2016-04-04 15:34:50.409",
    "tenantid": "292FEC76-5F1C-486F-85A5-09D88096F098",
    "entity": "UILayoutManageMent"
  }
}


app.directive('layoutContainerRender',function($compile){

    var layoutContainerObj={};

    linkFn=function(scope, element, attributes, controller) {
    };

    layoutContainerObj.transclude='true';
    layoutContainerObj.restrict='E';
    layoutContainerObj.replace='true';
    layoutContainerObj.template="<div id={{containers.containerid}} ng-repeat='containers in layoutData.collections.container.rowset | orderBy: 'containerorderno' class='k-block'>" +
                                "<div class='k-header'><label>{{containers.containerheadertext}}</label>" +
                                "<span class='k-icon k-i-plus pull-right' onclick='addTableCellToTable(event)'></span>" +
                                "<span class='k-icon k-i-cancel pull-right' onclick='deleteTheContainer(event)'></span>" +
                                "</div> " +
                                "<layout-table-render></layout-table-render>" +
                                "</div>";

    layoutContainerObj.link = linkFn;

    return layoutContainerObj;  
});

Please help me to achieve this.

1 Answer 1

1

You can try with this code

in filtered = (Address.Entries 
                | filter:{IsRegistered: true} 
                | filterDate:'InfoDetails')">

Filter AngularJS Docs

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.