Using Array.map() on array of objects
<p>I am trying to use Array.map to slice the <code>description</code> property of each object within an array.</p>

<pre><code>docs = docs.map(function(currentValue, index, array){
            currentValue['description'] = currentValue.description.slice(0,10);
            return array;
        });
</code></pre>

<p>When I <code>console.log(docs)</code> it appears as though it has worked. However, I can no longer access the properties for some reason.</p>

<pre><code>console.log(docs[0].description); //undefined
</code></pre>

<p>It appears that I have turned my array of objects into an array of strings that appear to be objects. Any thoughts?</p>