Skip to content

Conversation

matthiaz
Copy link

You can have alfanumeric keys together with numeric keys. I changed the regular expression to fix this.

Example:

var arrResults = {"ID4":{"MAXNUMBERPRATICA":"27652","_odbc_connection_id":"ID4"},"4":{"MAXNUMBERPRATICA":"123456","_odbc_connection_id":"ID4"}};
console.log(sprintf("check results = %(arrResults[4].MAXNUMBERPRATICA)s",{"arrResults":arrResults}));
console.log(sprintf("check results = %(arrResults[ID4].MAXNUMBERPRATICA)s",{"arrResults":arrResults}));

You can have alfanumeric keys together with numeric keys. I changed the regular expression to fix this. 

Example: 
```
var arrResults = {"ID4":{"MAXNUMBERPRATICA":"27652","_odbc_connection_id":"ID4"},"4":{"MAXNUMBERPRATICA":"123456","_odbc_connection_id":"ID4"}};
console.log(sprintf("check results = %(arrResults[4].MAXNUMBERPRATICA)s",{"arrResults":arrResults}));
console.log(sprintf("check results = %(arrResults[ID4].MAXNUMBERPRATICA)s",{"arrResults":arrResults}));
```
@alexei
Copy link
Owner

alexei commented Mar 15, 2016

Thanks for your input. Does .ID4 not work in your case?

@matthiaz
Copy link
Author

errr, I haven't tried that... I just did a test and you are right. That works perfectly.

Feel free to decide wheter or not my change gets included. As you correctly point out, this already works if I change the way I'm requesting the parameter:

console.log(sprintf("check results = %(arrResults.ID4.MAXNUMBERPRATICA)s",{"arrResults":arrResults}));

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants