Open GoogleCodeExporter opened 9 years ago
In larger JSON framework, for jsonpath analysis it might be usefull to have more resultTypes: * normalized path - just steps of path as an array (w/out tracing target object) if( P.resultType == "WAY" ) return P.normalize(expr).split(';'); P.trace(P.normalize(expr).replace(/^\$;/,""), obj, "$"); return P.result.length ? P.result : false; * normalized traced path - with expanded expressions/filters/slices asTrace: function(path) { return path.split(";"); } store: function(p, v) { if (p) P.result[P.result.length] = ( P.resultType == "PATH" ? P.asPath(p) : ( P.resultType == "TRACE" ? P.asTrace(p) : v)); return !!p; },
Original issue reported on code.google.com by qwigly...@gmail.com on 4 Nov 2009 at 12:19
qwigly...@gmail.com
Original issue reported on code.google.com by
qwigly...@gmail.com
on 4 Nov 2009 at 12:19