title: Flattening nested JSON objects with Circe
body: <p>Suppose I have a JSON object like this:</p>
  
  <pre><code>{
     "foo": true,
     "bar": {
        "baz": 1,
        "qux": {
          "msg": "hello world",
          "wow": [null]
        }
     }
  }
  </code></pre>
  
  <p>And I want to flatten it recursively to a single layer, with the keys merged with an underscore:</p>
  
  <pre><code>{
     "foo": true,
     "bar_baz": 1,
     "baz_qux_msg": "hello world",
     "baz_qux_wow": [null]
  }
  </code></pre>
  
  <p>How can I do this with <a href="https://github.com/circe/circe" rel="noreferrer">Circe</a>?</p>
  
  <p>(Note: this is another FAQ from the <a href="https://gitter.im/circe/circe?at=5d838ad2e45b6d47321d4bc5" rel="noreferrer">Circe Gitter channel</a>.)</p>