title: Unwrap Maybe values from nested records
body: <p>I have a series of nested records of config information in PureScript that I want to pass to a JavaScript function. These records predominantly consist of <code>Maybe</code>-typed values. Is there a way I can serialize this to JavaScript objects which omit the <code>Nothing</code>-valued methods and unwrap the <code>Just</code>-valued methods?</p>
  
  <p>I've <a href="https://pastebin.com/sjVzSvnK" rel="nofollow noreferrer">taken a shot</a> at writing this in JavaScript using semi-hacky <code>instanceof</code> checks, but it's been very painful, e.g. because there is no easy way to stop the recursion (I can't differentiate my records from random other JavaScript objects). Is there a better way?</p>