title: How can I create an array of values from a single GeoJSON property?
body: <p><em>Note: it's been pointed out that some possible solutions were already proposed <a href="https://stackoverflow.com/questions/11922383/access-process-nested-objects-arrays-or-json/11922384#11922384">here</a>. However, <code>.map</code> is <strong>exactly</strong> what I was looking for and doesn't appear in that otherwise-comprehensive post. Thomas's answer below covers my use case.</em></p>
  
  <p>Using javascript, how can I make an array of values that represents an arbitrary property value for each feature in a GeoJSON file? I realize I'm failing JSON 101 here, but how can I create this:</p>
  
  <pre><code>['caiparinha','caucasian','margarita']
  </code></pre>
  
  <p>from this?</p>
  
  <pre><code>{
    "type": "FeatureCollection",
    "features": [
      {
        "type": "Feature",
        "properties": {
          "name": "brasil",
          "beverage": "caiparinha"
        },
        "geometry": {
          "type": "Point",
          "coordinates": [
            -56.953125,
            -8.754794702435605
          ]
        }
      },
      {
        "type": "Feature",
        "properties": {
          "name": "russia",
          "beverage": "caucasian"
        },
        "geometry": {
          "type": "Point",
          "coordinates": [
            39.0234375,
            57.136239319177434
          ]
        }
      },
      {
        "type": "Feature",
        "properties": {
          "name": "mexico",
          "beverage": "margarita"
        },
        "geometry": {
          "type": "Point",
          "coordinates": [
            -105.1171875,
            25.165173368663954
          ]
        }
      }
    ]
  }
  </code></pre>
  
  <p>If the source were a CSV, it would be as easy as selecting/parsing a single column from the attributes, but with GeoJSON the properties (i.e. columns) are so deeply-nested that I haven't had any luck with <code>.map</code>, and I'd like to avoid looping, but I'll take anything at this point.</p>
  
  <p>Context is that I'd like to be able to extract distribution information from each "variable" attached to the features I'm mapping, for <a href="http://www.macwright.org/simple-statistics/docs/simple_statistics.html#section-122" rel="nofollow noreferrer">example</a>.</p>