title: java script, map the subfield of an object array
body: <p>I have a data array.</p>
  <pre><code>mdata= [{&quot;id&quot;:7,&quot;scs_geometry&quot;:{&quot;type&quot;:&quot;LineString&quot;,&quot;coordinates&quot;:[[0,1,2],[3,4,5]]}},
  {&quot;id&quot;:8,&quot;scs_geometry&quot;:{&quot;type&quot;:&quot;LineString&quot;,&quot;coordinates&quot;:[[6,7,8],[9,10,11]]}}]
  </code></pre>
  <p>I want to get another array with subfield coordinates. e.g.,</p>
  <pre><code>[{&quot;coordinates&quot;:[[0,1,2],[3,4,5]]}},
  {&quot;coordinates&quot;:[[6,7,8],[9,10,11]]}}]
  </code></pre>
  <p>i know</p>
  <pre><code>mdata_coordinates=mdata.map(({ scs_geometry}) =&gt; ({scs_geometry}))); // How can I access coodinates field to get array only with &quot;coordinates&quot;. 
  </code></pre>