title: Raw data to Array or Json using js
body: <p>It would be helpful if someone could assist on this. I want to store this raw data into array from <code>BEGIN:VEVENT</code> to <code>END:VEVENT</code></p>
  
  <h1>raw data</h1>
  
  <pre><code>BEGIN : VEVENT\r\nDTSTART;
  TZID = America / New_York : 20161231 T123000\r\nDTEND;
  TZID = America / New_York : 20161231 T133000\r\nRRULE : FREQ = WEEKLY;
  UNTIL = 20170211 T045959Z;
  BYDAY = SA\r\nDTSTAMP : 20170228 T012109Z\r\nUID : h742jrf72h1r4oferera9dp070@google.com\r\nCREATED : 20170102 T190437Z\r\nDESCRIPTION : \r\nLAST - MODIFIED : 20170211 T152911Z\r\nLOCATION : \r\nSEQUENCE : 0 \r\nSTATUS : CONFIRMED\r\nSUMMARY : happy\r\nTRANSP : OPAQUE\r\nEND : VEVENT\r\nBEGIN : VEVENT\r\nDTSTART;
  TZID = America / New_York : 20170106 T170000\r\nDTEND;
  TZID = America / New_York : 20170106 T173000\r\nRRULE : FREQ = WEEKLY;
  BYDAY = FR\r\nDTSTAMP : 20170228 T012109Z\r\nUID : ukad1og7htm89pc8j4di4otlk8_R20170106T220000@google.com\r\nCREATED : 20141126 T041733Z\r\nDESCRIPTION : \r\nLAST - MODIFIED : 20170120 T210013Z\r\nLOCATION : sds\r\nSEQUENCE : 0 \r\nSTATUS : CONFIRMED\r\nSUMMARY : Gold / Blue / Green Weapons\r\nTRANSP : OPAQUE\r\nBEGIN : VALARM\r\nACTION : NONE\r\nTRIGGER;
  VALUE = DATE - TIME : 19760401 T005545Z\r\nEND : VALARM\r\nEND : VEVENT\r\nBEGIN : VEVENT\r\nDTSTART;
  TZID = America / New_York : 20161229 T160000\r\nDTEND;
  TZID = America / New_York : 20161229 T164500\r\nDTSTAMP : 20170228 T012109Z\r\nUID : 8 thf9943qdnjkcrtlvt6k8kjmg@google.com\r\nRECURRENCE - ID;
  TZID = America / New_York : 20161229 T160000\r\nCREATED : 20160612 T220329Z\r\nDESCRIPTION : \r\nLAST - MODIFIED : 20170117 T200013Z\r\nLOCATION : \r\nSEQUENCE : 0 \r\nSTATUS : CONFIRMED\r\nSUMMARY : Juniors school\r\nTRANSP : OPAQUE\r\nBEGIN : VALARM\r\nACTION : NONE\r\nTRIGGER;
  VALUE = DATE - TIME : 19760401 T005545Z\r\nEND : VALARM\r\nEND : VEVENT\r\n
  </code></pre>
  
  <h1>expected output</h1>
  
  <pre><code>[
    {
      Hide Copy Code BEGIN: VEVENT,
      DTSTART: 20160314 T093000Z,
      DTEND: 20160314 T143000Z,
      DTSTAMP: 20160427 T141329Z,
      CREATED: 20160228 T142659Z,
      DESCRIPTION: For assembler,
      LAST - MODIFIED: 20160314 T133208Z,
      SEQUENCE: 0,
      STATUS: CONFIRMED,
      END: VEVENT
    }, {
      Hide Copy Code BEGIN: VEVENT,
      DTSTART: 20160314 T093000Z,
      DTEND: 20160314 T143000Z,
      DTSTAMP: 20160427 T141329Z,
      CREATED: 20160228 T142659Z,
      DESCRIPTION: For assembler,
      LAST - MODIFIED: 20160314 T133208Z,
      SEQUENCE: 0,
      STATUS: CONFIRMED,
      END: VEVENT
    }
  ]
  </code></pre>
  
  <p>I see it works in ruby. I tried some api for js converting icasdata to Json, but it doesn't fetch exact data so I'm thinking if I can read the raw data and pass it to an array without any API. Any suggestion on above question that will help. Thanks.</p>