title: How to create an object if one of it's properties requires a value of a promise
body: <p>How can i use the value of a promise to add it to an object property? If anyone can help me ill appreciate it.</p>
  
  <p>//dolar.js</p>
  
  <pre class="lang-js prettyprint-override"><code>const axios = require('axios');
  const url ='https://s3.amazonaws.com/dolartoday/data.json';
  
  async function getTasaDolar(priceBs) {
    axios.get(url).then(function (response) {
      return response.data.USD.transferencia;
    }).catch(function(error) {
    }).then(function(response) {{
      console.log('--------');
      console.log(priceBs/response);
      return priceBs/response;
    }});
  }
  
  module.exports = getTasaDolar;
  </code></pre>
  
  <p>//object.js</p>
  
  <pre><code>const getTasaDolar = require('./dolar.js');
  
  async function myFunc ({name, brand, category, priceBs}) {
      const object =  {
          name,
          brand,
          category,
          priceBs,
          priceDolar :  getTasaDolar(priceBs)
      }
  
      return object;
  }
  
  const hola =  myFunc({name:`hola`, brand: `Chocozuela`, category:`Carnes`, priceBs:645000});
  console.log(hola);
  </code></pre>
  
  <p>When I run this the output is :</p>
  
  <pre><code>Promise {
    { name: 'hola',
      brand: 'Chocozuela',
      category: 'Carnes',
      priceBs: 645000,
      priceDolar: Promise { undefined } } }
  --------
  3.467229680260142.
  </code></pre>
  
  <p>As you can see the value 3.46 is consoled.log but when i console.log the hola object the property priceDolar is Promise {undefined}</p>