title: How to find object value from property path in Javascript object
body: <p>I explain the problem with sample.</p>
  
  <p>For example i have javascript object. It looks like: </p>
  
  <pre><code>var trial= { points:[{x:1,y:2},{x:5,y:2},{x:3,y:4}] , obj:{id:5,name:"MyName"} }
  </code></pre>
  
  <p>I use deep diff module to find difference between two json array. Then it find the differences and find difference path. If value of x is changed, then it finds.</p>
  
  <p>For example</p>
  
  <pre><code>path = ["points",0,"x"] 
  or
  path= ["obj","name"]
  </code></pre>
  
  <p>So my question is that how to generate json object from these path. </p>
  
  <p>For example i have to generate that</p>
  
  <pre><code>trial.points[0].x        or    trial.obj.name  
  </code></pre>
  
  <p>How to do that ?  thank you for your answer.</p>