title: How to convert JSON to YAML in javascript
body: <p>I want to convert a json string to yaml format in javascript.I am trying my hand on google from last two days didnt found any solution or libraries.
  There are answers available for java but not for javascript.</p>
  
  <p>Suppose i have json string like this:</p>
  
  <pre><code>{
    "json": [
      "fat and rigid"
    ],
    "yaml": [
      "skinny and flexible"
    ],
    "object": {
      "array": [
        {
          "null_value": null
        },
        {
          "boolean": true
        },
        {
          "integer": 1
        }
      ]
    }
  }
  </code></pre>
  
  <p>conver to yaml: </p>
  
  <pre><code>json:
    - fat and rigid
  yaml:
    - skinny and flexible
  object:
    array:
      - null_value:
      - boolean: true
      - integer: 1
  </code></pre>
  
  <p>There is a online converter <a href="http://www.json2yaml.com/" rel="noreferrer">http://www.json2yaml.com/</a> , but how to convert to it in javascript.</p>