docs: public static Object getObjectIndex(Object obj, double dblIndex,
                                          Context cx, Scriptable scope)
      {
          Scriptable sobj = toObjectOrNull(cx, obj, scope);
          if (sobj == null) {
              throw undefReadError(obj, toString(dblIndex));
          }
  
          int index = (int)dblIndex;
          if (index == dblIndex) {
              return getObjectIndex(sobj, index, cx);
          }
          String s = toString(dblIndex);
          return getObjectProp(sobj, s, cx);
      }