Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Merge pull request #11 from k-kawa/master

declare "ret" as a local variable
  • Loading branch information...
commit c0b5fabeafed87bf24e341f2c5da186382db9d86 2 parents 35deb4d + ebcb8d4
@s3u authored
Showing with 1 addition and 1 deletion.
  1. +1 −1  lib/jsonpath.js
View
2  lib/jsonpath.js
@@ -20,7 +20,7 @@ function jsonPath(obj, expr, arg) {
}
var subx = [];
- ret = expr.replace(/[\['](\??\(.*?\))[\]']/g, function($0,$1){return "[#"+(subx.push($1)-1)+"]";})
+ var ret = expr.replace(/[\['](\??\(.*?\))[\]']/g, function($0,$1){return "[#"+(subx.push($1)-1)+"]";})
.replace(/'?\.'?|\['?/g, ";")
.replace(/;;;|;;/g, ";..;")
.replace(/;$|'?\]|'$/g, "")
Please sign in to comment.
Something went wrong with that request. Please try again.