title: Get array of strings from helm config
body: <p>Ultimately i'm trying to get an array of strings e.g. <code>['foo', 'bar']</code> in my js app from my helm config.</p>
  
  <p>./vars/dev/organizations.yaml</p>
  
  <pre><code>...
  organizations:
    - 'foo'
    - 'bar'
  ...
  </code></pre>
  
  <p>./templates/configmap.yaml</p>
  
  <pre><code>...
  data:
    organizations.yaml: |
      organizations: "{{ toYaml .Values.organizations | indent 4 }}"
  ...
  </code></pre>
  
  <p>./templates/deployment.yaml</p>
  
  <pre><code>...
  containers:
      args:
         - "--organizations-config"
         - "/etc/app/cfg/organizations.yaml"
  ...
  </code></pre>
  
  <p>index.js</p>
  
  <pre><code>...
  const DEFAULT_ORGANIZATIONS_PATH = './vars/local/organizations.yaml'
  const program = require('commander')
  
  program
    .option(
      '--organizations-config &lt;file path&gt;',
      'The path to the organizations config file.', DEFAULT_ORGANIZATIONS_PATH)
    .parse(process.argv)
  
  function readConfigs () {
    return Promise.all(configs.map(path =&gt; {
      return new Promise((resolve, reject) =&gt; {
        fs.readFile(path, (err, data) =&gt; {
          err ? reject(err) : resolve(yaml.safeLoad(data))
        })
      })
    }))
  }
  
  readConfigs()
    .then(configs =&gt; {
      let organizationsConfig = configs[3]
  
      console.log('organizationsConfig = ', organizationsConfig)
      console.log('organizationsConfig.organizations = ', organizationsConfig.organizations)
  ...
  </code></pre>
  
  <p>The output from above is:</p>
  
  <pre><code>organizationsConfig =  { organizations: '    - foo - bar' }
  organizationsConfig.organizations =      - foo - bar
  </code></pre>
  
  <p>How can I modify my helm config so that <code>organizationsConfig.organizations</code> will be <code>['foo', 'bar']</code></p>