title: Convert string to object path
body: <p>I would like to achieve something like this:</p>
  
  <pre><code>let database = {
    foo: {
      bar: {}
    }
  }
  
  deepValue(database, "foo/bar/hello") = "world"
  
  console.log(database)
  // database: {
  //   foo: {
  //     bar: {
  //       hello: "world"
  //     }
  //   }
  // }
  </code></pre>
  
  <p>So deepValue returns the place in an object with the given path, so I can write to it. Is there something maybe in ES6, ES7 that could help me with this issue? Or is there a good way to generate the object path from a string?</p>
  
  <p><strong>Answered:</strong></p>
  
  <blockquote>
    <p>Ack, got closed before I could post. Here: <a href="http://jsfiddle.net/6bb1Lq6k" rel="nofollow noreferrer">jsfiddle.net/6bb1Lq6k</a> –
    Jamiec</p>
  </blockquote>