title: Combine multiple GeoJSON objects with javascript
body: <p>Is it possible to merge multiple GeoJSON objects using javascript built-in functions? If not, how can I do this on the fly? </p>
  
  <p>I tried <code>geoJSON1 = geoJSON1.concat(geoJSON2)</code> as per suggestions for JSON (e.g. <a href="https://stackoverflow.com/questions/433627/concat-json-objects">here</a>), which returns <code>geoJSON1.concat is not a function</code>. The GeoJSONs are point features and are valid GeoJSON objects.</p>
  
  <p>This is probably a simple question with "no" for an answer, but I haven't been able to find a conclusive answer.  </p>
  
  <p>Example GeoJSONs:  </p>
  
  <pre><code>GeoJSON1 = { "type" : "FeatureCollection",
      "features" : [
           { "type" : "Feature",
          "id" : 1,
              "geometry" : {
                  "type" : "Point",
                  "coordinates" : ["-119.6165333","34.35935"]},
          "properties" : { "video" : "S105SC_Tape13o.noaudio.mpg", "video_second" : "0", "time" : "19:26:58", "date" : "2005-08-26"}
          },
           { "type" : "Feature",
          "id" : 2,
              "geometry" : {
                  "type" : "Point",
                  "coordinates" : ["-119.6165167","34.35935"]},
          "properties" : { "video" : "S105SC_Tape13o.noaudio.mpg", "video_second" : "2", "time" : "19:27:00", "date" : "2005-08-26"}
          }
      ]
  }
  
  GeoJSON2 = { "type" : "FeatureCollection",
      "features" : [
           { "type" : "Feature",
          "id" : 27,
              "geometry" : {
                  "type" : "Point",
                  "coordinates" : ["-119.61635","34.3593833"]},
          "properties" : { "video" : "S105SC_Tape13o.noaudio.mpg", "video_second" : "55", "time" : "19:27:53", "date" : "2005-08-26"}
          },
           { "type" : "Feature",
          "id" : 28,
              "geometry" : {
                  "type" : "Point",
                  "coordinates" : ["-119.6163333","34.3594"]},
          "properties" : { "video" : "S105SC_Tape13o.noaudio.mpg", "video_second" : "56", "time" : "19:27:54", "date" : "2005-08-26"}
          }
      ]
  }
  </code></pre>
  
  <p>Desired result (single GeoJSON with all the features of the originals):  </p>
  
  <pre><code>newGeoJSON = { "type" : "FeatureCollection",
      "features" : [
           { "type" : "Feature",
          "id" : 1,
              "geometry" : {
                  "type" : "Point",
                  "coordinates" : ["-119.6165333","34.35935"]},
          "properties" : { "video" : "S105SC_Tape13o.noaudio.mpg", "video_second" : "0", "time" : "19:26:58", "date" : "2005-08-26"}
          },
           { "type" : "Feature",
          "id" : 2,
              "geometry" : {
                  "type" : "Point",
                  "coordinates" : ["-119.6165167","34.35935"]},
          "properties" : { "video" : "S105SC_Tape13o.noaudio.mpg", "video_second" : "2", "time" : "19:27:00", "date" : "2005-08-26"}
          },
           { "type" : "Feature",
          "id" : 27,
              "geometry" : {
                  "type" : "Point",
                  "coordinates" : ["-119.61635","34.3593833"]},
          "properties" : { "video" : "S105SC_Tape13o.noaudio.mpg", "video_second" : "55", "time" : "19:27:53", "date" : "2005-08-26"}
          },
           { "type" : "Feature",
          "id" : 28,
              "geometry" : {
                  "type" : "Point",
                  "coordinates" : ["-119.6163333","34.3594"]},
          "properties" : { "video" : "S105SC_Tape13o.noaudio.mpg", "video_second" : "56", "time" : "19:27:54", "date" : "2005-08-26"}
          }
      ]
  }
  </code></pre>