Skip to content
This repository was archived by the owner on Apr 10, 2026. It is now read-only.
This repository was archived by the owner on Apr 10, 2026. It is now read-only.

Dynamically update json env #387

Description

@1000thSummer

Is your feature request related to a problem? Please describe.
We would like to dynamically update json files during the MTP rendering process.
There are 2 approaches at this moment but not fit our requirement very well:

  • overrideStrategy: merge
This approach requires 2 json object pre-defined in upper-level config-map, which sometimes we don't have.
  • using handlerbars helper function assign
This approach will assign values to a json object, BUT under a nested path `data.root`
https://github.com/razee-io/MustacheTemplate/blob/master/src/handlebar-helpers.js#L12

Describe the solution you'd like
A more straight-forward helper function would be ideal, and can be as simple as

  assign: function (obj, key, value) {
    if (!obj) {
      obj = {};
    }
    obj[key] = value;
  },

Describe alternatives you've considered
allowing dynamically adding helper function during rendering would also be great and allow more flexibility.

Additional context
N/A

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions