lodash map returning array of objects
<p>i have a arrray of objects where i wish to convert the data from medicine to type string. The only problem is instead of returning the array of objects is returing me the array of medicine.</p>

<p>Example
input:</p>

<pre><code>data = [{medicine: 1234, info: "blabla"},{medicine: 9585, info: "blabla"},..]
</code></pre>

<p>desired output:</p>

<pre><code>data = [{medicine: "1234", info: "blabla"},{medicine: "9585", info: "blabla"},..]
</code></pre>

<p>What im getting?
Array of medicine numbers.</p>

<p>Here is my code:</p>

<pre><code>var dataMedicines = _.map(data, 'medicine').map(function(x) {
                return typeof x == 'number' ? String(x) : x;
            });
</code></pre>