Dot to Bracket Notation

Potency Low
Resilience Low
Cost Low
Tags: dot, bracket, array

Description

Dot to Bracket Notation transforms composite references in dot notation into square bracket notation.

Code Annotation Example

// @jscrambler enable dotToBracketNotation

Example

The following example is a composite reference in dot notation:

navigator.plugins.length

After transformation the composite reference is in square bracket notation

navigator["plugins"]["length"];

Consider combining this transformation with Duplicate Literals Removal to replace the string literals with variables (aliases) that will make the resulting code more resilient to automated de-obfuscator tools.

API Parameters

Example:

{
  "keys": {
    "accessKey": "XXXXXX",
    "secretKey": "YYYYYY"
  },
  "applicationId": "ZZZZZZ",
  "params": [
    {
      "name": "dotToBracketNotation"
    }
  ]
}