phaser - v4.0.0-rc.4
    Preparing search index...
    • Sets a value in an object, allowing for dot notation to control the depth of the property.

      For example:

      var data = {
      world: {
      position: {
      x: 200,
      y: 100
      }
      }
      };

      SetValue(data, 'world.position.y', 300);

      console.log(data.world.position.y); // 300

      Parameters

      • source: object

        The object to set the value in.

      • key: string

        The name of the property in the object. If a property is nested, the names of its preceding properties should be separated by a dot (.)

      • value: any

        The value to set into the property, if found in the source object.

      Returns boolean