title: UI-Grid How to access binding values in nested JSON arrays
body: <p>Can someone guide on the correct syntax for accessing binding values if the data is a nested JSON array. Here is the plunker for the use case <a href="http://plnkr.co/edit/tizLxnAtgqDnptiEb3mg?p=preview" rel="nofollow">http://plnkr.co/edit/tizLxnAtgqDnptiEb3mg?p=preview</a></p>
  
  <p>Basically, as you can see here address is a collection of different addresses and I need a way to filter it similar to the Angular JS filter expression which I already tried in above and it's working. But is there some expression specific to UI Grid such as MainAttribute[childAttribute='XYZ'].value or something like that. </p>
  
  <p>Issue is I'm able to retrieve filtered child attributes from the array using AngularJS expression but at the backend it's still an array and causing issue such as from front end not able to filter on that column and when you export to CSV it's giving complete JSON array for that column.</p>
  
  <p><strong>app.js</strong></p>
  
  <pre><code>var app = angular.module('app', ['ngTouch', 'ui.grid', 'ui.grid.edit']);
  
  app.controller('MainCtrl', ['$scope', function ($scope) {
      var statusTemplate = "&lt;div&gt;{{(address | filter:{street:'303 Dove Ave'})[0].city}}&lt;/div&gt;";
  
      $scope.gridOptions = {
          enableSorting: true, 
          columnDefs: [{
              name: 'firstName',
              field: 'first-name'
          }, {
              name: '1stFriend',
              field: 'friends[0]'
          }, {
              name: 'city',
              cellTemplate: statusTemplate
          }, {
              name: 'getZip',
              field: 'getZip()',
              enableCellEdit: false
          }],
          data : [{
              "first-name": "Cox",
              "friends": [
                  "friend0"
              ],
              "address": [{
                  street: "301 Dove Ave",
                  city: "Nairobi",
                  zip: "39565"
              }, {
                  street: "302 Dove Ave",
                  city: "Delhi",
                  zip: "39565"
              }, {
                  street: "303 Dove Ave",
                  city: "Patna",
                  zip: "39565"
              }, {
                  street: "304 Dove Ave",
                  city: "Jamshedpur",
                  zip: "39565"
              }, {
                  street: "305 Dove Ave",
                  city: "Bangalore",
                  zip: "39565"
              }],
              "getZip": function() {
                  return this.address.zip;
              }
          }]
      };
  }]);
  </code></pre>
  
  <p><strong>index.html</strong></p>
  
  <pre><code>&lt;html ng-app="app"&gt;
    &lt;head&gt;
      &lt;script src="http://ajax.googleapis.com/ajax/libs/angularjs/1.2.16/angular.js"&gt;&lt;/script&gt;
      &lt;script src="http://ajax.googleapis.com/ajax/libs/angularjs/1.2.16/angular-touch.js"&gt;&lt;/script&gt;
      &lt;script src="http://ajax.googleapis.com/ajax/libs/angularjs/1.2.16/angular-animate.js"&gt;&lt;/script&gt;
      &lt;script src="http://ui-grid.info/docs/grunt-scripts/csv.js"&gt;&lt;/script&gt;
      &lt;script src="http://ui-grid.info/docs/grunt-scripts/pdfmake.js"&gt;&lt;/script&gt;
      &lt;script src="http://ui-grid.info/docs/grunt-scripts/vfs_fonts.js"&gt;&lt;/script&gt;
      &lt;script src="http://ui-grid.info/release/ui-grid-unstable.js"&gt;&lt;/script&gt;
      &lt;link rel="stylesheet" href="http://ui-grid.info/release/ui-grid-unstable.css" type="text/css"&gt;
      &lt;link rel="stylesheet" href="main.css" type="text/css"&gt;
    &lt;/head&gt;
    &lt;body&gt;
  
  &lt;div ng-controller="MainCtrl"&gt;
    &lt;div ui-grid="gridOptions" class="grid"&gt;&lt;/div&gt;
  &lt;/div&gt;
      &lt;script src="app.js"&gt;&lt;/script&gt;
    &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>