Question: Is there a way to clone an object with only few properties of the object in JS?
For example.. 

```
var Person = {
    name: "Bob",
    age: 32,
    salary: 20000
};

```

I have to create another person object with just the name and age property so that it will look something like this : 

```
var clonedPerson = {
    name: "Bob",
    age: 32
};

```

I could do a deep clone of the object and *delete*. But I wanted to know if there are better ways to do it.

Answer: 
Using the latest ES6, you can achieve this by the following code.. 

```js
const Person = {
  name: "Bob",
  age: 32,
  salary: 20000
};
const { salary , ...clonedPerson } = Person

console.log(clonedPerson)
```
More simple?

```js
var Person = {
    name: "Bob",
    age: 32,
    salary: 20000
};
var ClonedPerson = jQuery.extend({}, Person);
delete ClonedPerson.salary;

console.log(JSON.stringify(Person));
console.log(JSON.stringify(ClonedPerson));
```

```html
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
```