title: How to remove unwanted keys and key values
body: <p><br/>
  Here is the original <strong>JSON</strong> object I am retrieving from my <strong>CouchDB</strong> database:</p>
  
  <pre><code> {
    "total_rows": 3,
    "offset": 0,
    "rows": [
      {
        "id": "1e8fe199d4e761b71bb8920eb3003db2",
        "key": null,
        "value": {
          "_id": "1e8fe199d4e761b71bb8920eb3003db2",
          "_rev": "3-6979e0cd646f2bc0ddf84c0664d25808",
          "Room_number": 99,
          "Location": "City campus",
          "Timetable": {
            "Monday": [
              "08:30",
              "10:00",
              "11:30",
              "13:30",
              "14:14"
            ],
            "Tuesday": [
              "08:30",
              "10:00",
              "11:30",
              "13:30",
              "14:14"
            ],
            "Sunday": [
             "08:30",
              "10:00",
              "11:30",
              "13:30",
              "14:14"
            ]
          }
        }
      },
      {
        "id": "1e8fe199d4e761b71bb8920eb3004cc6",
        "key": null,
        "value": {
          "_id": "1e8fe199d4e761b71bb8920eb3004cc6",
          "_rev": "2-f7250cca62a804137174a20f48312c40",
          "Room_number": 12,
          "Location": "City hall",
          "Timetable": {
            "Monday": [
              "08:30",
              "10:00",
              "11:30",
              "13:30",
              "14:14"
            ],
            "Tuesday": [
              "08:30",
              "10:00",
              "11:30",
              "13:30",
              "14:14"
            ],
            "Sunday": [
             "08:30",
              "10:00",
              "11:30",
              "13:30",
              "14:14"
            ]
        }
      }
    ]
  }
  </code></pre>
  
  <p>I want to make it look like the JSON object below:</p>
  
  <pre><code>[
      {
          "Room_number": 99,
          "Location": "City campus",
          "Timetable": {
            "Monday": [
              "08:30",
              "10:00",
              "11:30",
              "13:30",
              "14:14"
            ],
            "Tuesday": [
              "08:30",
              "10:00",
              "11:30",
              "13:30",
              "14:14"
            ],
            "Sunday": [
             "08:30",
              "10:00",
              "11:30",
              "13:30",
              "14:14"
            ]
          }
      },
      {
          "Room_number": 12,
          "Location": "City hall",
          "Timetable": {
            "Monday": [
              "08:30",
              "10:00",
              "11:30",
              "13:30",
              "14:14"
            ],
            "Tuesday": [
              "08:30",
              "10:00",
              "11:30",
              "13:30",
              "14:14"
            ],
            "Sunday": [
             "08:30",
              "10:00",
              "11:30",
              "13:30",
              "14:14"
            ]
          }
      }
  ]
  </code></pre>
  
  <p>Here is what I have got so far:</p>
  
  <pre><code>[
      {
          "value": {
              "Room_number": 99,
              "Location": "City campus",
              "Timetable": {
                "Monday": [
                  "08:30",
                  "10:00",
                  "11:30",
                  "13:30",
                  "14:14"
                ],
                "Tuesday": [
                  "08:30",
                  "10:00",
                  "11:30",
                  "13:30",
                  "14:14"
                ],
                "Sunday": [
                 "08:30",
                  "10:00",
                  "11:30",
                  "13:30",
                  "14:14"
                ]
              }
          }
      },
      {
          "value": {
              "Room_number": 12,
              "Location": "City hall",
              "Timetable": {
                "Monday": [
                  "08:30",
                  "10:00",
                  "11:30",
                  "13:30",
                  "14:14"
                ],
                "Tuesday": [
                  "08:30",
                  "10:00",
                  "11:30",
                  "13:30",
                  "14:14"
                ],
                "Sunday": [
                 "08:30",
                  "10:00",
                  "11:30",
                  "13:30",
                  "14:14"
                ]
              }
          }
      }
  ]
  </code></pre>
  
  <p>Here is a <strong>NodeJS</strong> code I am using to achieve this:</p>
  
  <pre><code>var express = require('express')
     , db = require('nano')('http://localhost:5984/rooms_database')
     , app = express();
  
  // query a view
  db.view('show_rooms', 'view_show_rooms', function (err, doc)
  {
      app.get("/", function(request,response)
      {
          var json_data = doc;
          json_data = json_data.rows;
  
          for (var i = 0; i &lt; json_data.length; i++)
          {
              delete json_data[i].id;
              delete json_data[i].key;
              delete json_data[i].value._id;
              delete json_data[i].value._rev;
          }
  
          response.send(json_data);
      });
  });
  
  app.listen(8080);
  console.log('************ Server is running! ************');
  </code></pre>
  
  <p>I am using standard view in the <strong>CouchDB</strong>:</p>
  
  <pre><code>function(doc)
  {
      emit(null, doc);
  }
  </code></pre>
  
  <p><strong>Can anyone tell me how to get rid of the <code>'value'</code> key in my JSON object?</strong></p>