lib/jsonpath-object-transform.js
function seekSingle(data, pathStr, result, key) {
    if(pathStr.indexOf('$') < 0){
      result[key] = pathStr;
    }else{
      var seek = jsonPath.eval(data, pathStr) || [];

      result[key] = seek.length ? seek[0] : undefined;
    }
  }
function seekSingle(data, pathStr, result, key) {
    if(pathStr.indexOf('$') < 0){
      result[key] = pathStr;
    }else{
      var seek = jsonPath.eval(data, pathStr) || [];

      result[key] = seek.length ? seek[0] : undefined;
    }
  }
function seekSingle ( data , pathStr , result , key ) { if ( pathStr . indexOf ( '$' ) < 0 ) { result [ key ] = pathStr ; } else { var seek = jsonPath . eval ( data , pathStr ) || [ ] ; result [ key ] = seek . length ? seek [ 0 ] : undefined ; } }
Get single property from data object.

@param {object} data
@param {string} pathStr
@param {object} result
@param {string} key
Get single property from data object .