Permalink
Browse files

() fix complex key processing.

  • Loading branch information...
1 parent 1a956b3 commit ef0d975013497091bdaafaa53dd45291b2e9ef0b @zpoley committed Feb 21, 2011
Showing with 3 additions and 3 deletions.
  1. +3 −3 lib/jsonCommand.js
View
@@ -249,7 +249,7 @@ JSON.Command.prototype.processKeys = function(parsedObject) {
var hsh = {}, cols = [];
for (var i = 0; (i < this.keys.length); i++) {
try {
- if (this.keys[i].match(".")) {
+ if (this.keys[i].indexOf(".") > -1) {
// create any keys that don't exist in the object chain
var s = this.keys[i].split(".");
for (var j = 1; (j < s.length); j++) {
@@ -264,8 +264,8 @@ JSON.Command.prototype.processKeys = function(parsedObject) {
cols.push(eval("parsedObject." + s.join(".")));
}
else {
- hsh[keys[i]] = parsedObject[keys[i]];
- cols.push(parsedObject[keys[i]]);
+ hsh[this.keys[i]] = parsedObject[this.keys[i]];
+ cols.push(parsedObject[this.keys[i]]);
}
}
catch(ex) {

0 comments on commit ef0d975

Please sign in to comment.