title: I want to create nested JSON for following array using Node.js
body: <p>I want to create nested JSON for using following array and it is separated according:</p>
  
  <p>Array which is used to create JSON:</p>
  
  <pre><code>[
    'TC0159 - 24 Ghanta', (channel name which is starts from TC)
    '12PM-1659PM        (timeslot)                                                                519.00',              (rate)
    '5PM-2259PM                                                                        714.00',
    '6AM-1159AM                                                                        323.00',
    'TC0514 - 4 real news',
    '12PM-1659PM                                                                        128.00',
    '5PM-2259PM                                                                        128.00',
    '6AM-1159AM                                                                        128.00',
    'TC0227 - 9 X M',
    '10PM-10:30PM                                                                        1105.00',
    '12PM-7PM                                                                        1105.00',
    '7AM-9AM                                                                        1496.00',
    '7PM-8PM                                                                        1105.00',
    '8PM-10PM                                                                        1105.00',
    '9AM-12PM                                                                        1887.00',
    'TC0224 - 9X',
    '10PM-10:30PM                                                                        128.00',
    '12PM-7PM                                                                        323.00',
    '7AM-9AM                                                                        128.00',
    '7PM-8PM                                                                        323.00',
    '8PM-10PM                                                                        128.00',
    '9AM-12PM                                                                        128.00'
  ]
  </code></pre>
  
  <p>I want to make JSON as represented below using the above array.</p>
  
  <pre><code>{
  "data": [
      {
          "channel_name": "channelName",
          "timeslot": {
              "10:00-1:00": 600,
              "2:00-5:00": 800
          }
      },
      {
          "channel_name": "channelName",
          "timeslot": {
              "10:00-1:00": 600,
              "2:00-5:00": 800
          }
      },
      {
          "channel_name": "channelName",
          "timeslot": {
              "10:00-1:00": 600,
              "2:00-5:00": 800
          }
      }
  ]}
  </code></pre>