title: How do I export a string to another Vue file?
body: <p>I have a masterData.js file that is a store for my master data, in short the file reads my mongo db data &amp; sends it to other project components. I created a function to export the string in the masterData.js file as:</p>
  
  <pre><code>/ ***************************** MUTATIONS
  const mutations = {
  exportColumns (payload) {
    Object.keys(payload[0]).map(x =&gt; { return x; });
   }
  }
  </code></pre>
  
  <p>Where payload will store all the rows and payload[0] holds the value of column header names. The output of this chunk of code is like this:</p>
  
  <pre><code>["_id","businessAreaName","businessAreaDisplay","councilDisplay","councilID"]
  </code></pre>
  
  <p>I want to transfer the values to masterData.vue file. My code on masterData.Vue is:</p>
  
  <pre><code>importColumns () 
    {
    let payload = {
      vm: this,
      mutation: 'masterData/exportColumns'
    };
  }
  </code></pre>
  
  <p>What else should I add to to check whether the column names are received or not?</p>