lib/jsonpath.js
function JSONPath(expression, options) {

		if (!options || typeof options != 'object') {
			options = {};
		}

		if (!options.resultType) {
			options.resultType = 'value';
		}

		if (typeof options.flatten == 'undefined') {
			options.flatten = false;
		}

		if (typeof options.wrap == 'undefined') {
			options.wrap = true;
		}

		if (typeof options.sandbox == 'undefined') {
			options.sandbox = {};
		}

		this.expression = expression;
		this.options = options;
		this.resultType = options.resultType;
	}
function JSONPath(expression, options) {

		if (!options || typeof options != 'object') {
			options = {};
		}

		if (!options.resultType) {
			options.resultType = 'value';
		}

		if (typeof options.flatten == 'undefined') {
			options.flatten = false;
		}

		if (typeof options.wrap == 'undefined') {
			options.wrap = true;
		}

		if (typeof options.sandbox == 'undefined') {
			options.sandbox = {};
		}

		this.expression = expression;
		this.options = options;
		this.resultType = options.resultType;
	}
function JSONPath ( expression , options ) { if ( ! options || typeof options != 'object' ) { options = { } ; } if ( ! options . resultType ) { options . resultType = 'value' ; } if ( typeof options . flatten == 'undefined' ) { options . flatten = false ; } if ( typeof options . wrap == 'undefined' ) { options . wrap = true ; } if ( typeof options . sandbox == 'undefined' ) { options . sandbox = { } ; } this . expression = expression ; this . options = options ; this . resultType = options . resultType ; }
Extract data from objects using JSONPath

@author    Stefan Goessner    <goessner.net>
@author    Jelle De Loecker   <jelle@develry.be>
@since     0.1.0
@version   0.1.0

@param     {String}   expr   The string expression
Extract data from objects using JSONPath