Question: I have following details in my test file.

```
HEADER
A12345678|PROCESS
B12345678|PROCESS
C12345678|GOOD
D12345678|GOOD
E123456789|PROCESS
F123456|GOOD
G12345678|PROCESS
8|TRAILER

```

What I want is to check if the first column is having length of 9. If it is we will proceed with those records, and if not we will discard the records.

Can anyone please help with this?

Answer: 
There was a slight error in the previous solution.
I reworked it a bit & was able to get this to work for me.

```
// Factory
angular.module('app')
.factory('CollabService', function($resource) {
    return $resource('/collabs/:collabId',
        {collabId: '@collabId'},
        {query: {
            method: 'GET',
            headers: {'Content-Type': 'application/json'},
            isArray: true
        }
    });
});

// Controller
var q = {};
q.collabId = 30;
...

// Query
CollabService.query({collabId: q.collabId}, function(promisedData) { 
     // Promised data
     console.log(promisedData);
});

```
This should work:

```
// Service
angular.module('app')
.factory('CollabService', function($resource) {
    return $resource('/collabs/:collabId', {collabId:'@collabId'}, {
        query: {
            method: 'GET',
            headers: {'Content-Type': 'application/json'},
            isArray: true
        }
    });
});

// Controller
var q = {};
q.collabId = 30;
q.firstWeek = 1;
q.nbWeeks = 4;
q.year = 2015;

// Get 
CollabService.get({collabId: q.collabId}, function(col) { 
     //Print result
     console.log(col);
});

// Query
CollabService.query(q, function(col) { 
     //Print result
     console.log(col);
});

```