title: how to get specific key value from object in javascript?
body: <p>I have an object and I would like to create a new object with a specific key value for example, </p>
  
  <p>I have a code as follows:</p>
  
  <pre><code>var objArray = [{
      "firstname": "bbb",
      "userName": "bbb1",
      "title": "",
      "created_by_user_id": "-1",
      "enabled": "true",
      "lastname": "AC",
      "last_connection": "",
      "password": "",
      "manager_id": "0",
      "id": "14",
      "job_title": "job1",
      "last_update_date": "2018-08-08 13:35:56.996"
    },
    {
      "firstname": "aaa",
      "icon": "icons/default/icon_user.png",
      "creation_date": "2018-08-08 13:35:56.876",
      "userName": "aaa1",
      "title": "",
      "created_by_user_id": "-1",
      "enabled": "true",
      "lastname": "AH",
      "last_connection": "",
      "password": "",
      "manager_id": "0",
      "id": "9",
      "job_title": "job2",
      "last_update_date": "2018-08-08 13:35:56.876"
    }
  ]
  for (var i = 0; i &lt; obj.length; i++) {
    objArray.push(obj[i]["id"]);
  }
  return objArray
  </code></pre>
  
  <p>I would like to create a new object like </p>
  
  <pre><code>[{
    "id": "14"
  }, {
  
    "id": "9",
  }]
  </code></pre>
  
  <p>But, my result is </p>
  
  <pre><code>[
    "9",
    "3"
  ]
  </code></pre>
  
  <p>I would like to get the result as an object. I appreciate any help.</p>
  
  <p>Thanks in advance</p>