Skip to content

Commit

Permalink
Simplify get
Browse files Browse the repository at this point in the history
  • Loading branch information
peritus committed Aug 4, 2011
1 parent 6c8ecbe commit cc2ea98
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions jsonpointer.js
Expand Up @@ -39,10 +39,9 @@ var get = function(obj, pointer) {
validate_input(obj, pointer);
if (pointer === "/") {
return obj;
} else {
pointer = pointer.split("/").slice(1);
return traverse(obj, pointer);
}
pointer = pointer.split("/").slice(1);
return traverse(obj, pointer);
}

var set = function(obj, pointer, value) {
Expand Down

0 comments on commit cc2ea98

Please sign in to comment.