client/splunk.js
function lastBraceInKey(str) {
  var len = str.length
    , brace
    , c;
  for (var i = 0; i < len; ++i) {
    c = str[i];
    if (']' == c) brace = false;
    if ('[' == c) brace = true;
    if ('=' == c && !brace) return i;
  }
}
function lastBraceInKey(str) {
  var len = str.length
    , brace
    , c;
  for (var i = 0; i < len; ++i) {
    c = str[i];
    if (']' == c) brace = false;
    if ('[' == c) brace = true;
    if ('=' == c && !brace) return i;
  }
}
function lastBraceInKey ( str ) { var len = str . length , brace , c ; for ( var i = 0 ; i < len ; ++ i ) { c = str [ i ] ; if ( ']' == c ) brace = false ; if ( '[' == c ) brace = true ; if ( '=' == c && ! brace ) return i ; } }
Locate last brace in `str` within the key.

@param {String} str
@return {Number}
@api private
Locate last brace in str within the key .