title: Filter array of objects into new arrays
body: <p>In React I have:</p>
  
  <pre><code>    state = {
       Producers: [], 
       France: [],
       Spain: [],
       Germany: [],
       Portugal: [],
       Greece: [],
       Austria: [],
       isLoading: false
       };
  </code></pre>
  
  <p>Producers Array:</p>
  
  <pre><code>     {
      "_id" : ObjectId("5cc0bf1815cc7a2225edab0b"),
      "Code" : "FPG-BCH14",
      "URL" : "/jSQcl",
      "Just_In" : "",
      "Country" : "France",
      "Region" : "Burgundy"
  },
  {
      "_id" : ObjectId("5cc0bf1815cc7a2225edab0c"),
      "Code" : "FPG-CHA17",
      "URL" : "/XPxx",
      "Just_In" : "",
      "Country" : "France",
      "Region" : "Burgundy"  
  },
  {
      "_id" : ObjectId("5cc0bf1815cc7a2225edab0d"),
      "Code" : "FPG-BPN16",
      "Just_In" : "",
      "Country" : "France",
      "Region" : "Burgundy"
  
  },
  
  {
      "_id" : ObjectId("5cc0bf1815cc7a2225edab0e"),
      "Code" : "PAP-VIN17",
      "Country" : "Portugal",
      "Region" : "Vinho Verde",
      "Subregion" : "Lima"
  
  }
  </code></pre>
  
  <p>Right now I have all objects in <code>state.Producers</code> and I want to put any object that has the value <code>state.Producers.Country === "France"</code> (and so on for all the countries).</p>
  
  <p>This is how I'm setting state:</p>
  
  <pre><code>    loadProducers = () =&gt; {
  
       API.getProducers()
       .then(res =&gt; 
       this.setState({Producers: res.data})
       )
       .catch(err =&gt; console.log(err));
         }
  </code></pre>
  
  <p>so I was thinking I need another <code>.then</code> statement after setting state for producers and then <code>.filter</code> for each country, but I can't seem to get it to work.</p>