How do I create a copy of an object?
<p>I have a object named <code>post</code> and I declare a new variable named <code>newPost</code> as type <code>post</code> object and then </p>

<blockquote>
  <p>var newPost = post</p>
</blockquote>

<p>but when I Modify any properties of <code>post</code> object, that Modified Influences properties of <code>newPost</code> object.</p>

<p>How do I solve this problem?</p>
