lib/jsonpath-object-transform.js
function seekArray(data, pathArr, result, key) {
    var subpath = pathArr[1];
    var path = pathArr[0];
    var seek = jsonPath.eval(data, path) || [];

    if (seek.length && subpath) {
      result = result[key] = [];

      seek[0].forEach(function(item, index) {
        walk(item, subpath, result, index);
      });
    } else {
      result[key] = seek;
    }
  }
function seekArray(data, pathArr, result, key) {
    var subpath = pathArr[1];
    var path = pathArr[0];
    var seek = jsonPath.eval(data, path) || [];

    if (seek.length && subpath) {
      result = result[key] = [];

      seek[0].forEach(function(item, index) {
        walk(item, subpath, result, index);
      });
    } else {
      result[key] = seek;
    }
  }
function seekArray ( data , pathArr , result , key ) { var subpath = pathArr [ 1 ] ; var path = pathArr [ 0 ] ; var seek = jsonPath . eval ( data , path ) || [ ] ; if ( seek . length && subpath ) { result = result [ key ] = [ ] ; seek [ 0 ] . forEach ( function ( item , index ) { walk ( item , subpath , result , index ) ; } ) ; } else { result [ key ] = seek ; } }
Get array of properties from data object.

@param {object} data
@param {array} pathArr
@param {object} result
@param {string} key
Get array of properties from data object .