title: Convert complex JavaScript object to dot notation object
body: <p>I have an object like </p>
  
  <pre><code>{ "status": "success", "auth": { "code": "23123213", "name": "qwerty asdfgh" } }
  </code></pre>
  
  <p>I want to convert it to dot notation (one level) version like: </p>
  
  <pre><code>{ "status": "success", "auth.code": "23123213", "auth.name": "qwerty asdfgh" }
  </code></pre>
  
  <p>Currently I am converting the object by hand using fields but I think there should be a better and more generic way to do this. Is there any?</p>
  
  <p>Note: There are some examples showing the opposite way, but i couldn't find the exact method.</p>
  
  <p>Note 2: I want it for to use with my serverside controller action binding.</p>