title: How to flatten a nested object with Ramda.js?
body: <p>Is there a way using <code>Ramda.js</code> by which I can have a nested object which can have multiple properties converted to an array of arrays as mentioned in the output?</p>
  <p>Please note that the <code>values</code> are always present in indices <code>3</code> and <code>4</code> where we have values like <code>21</code>, <code>4</code>, and so on. The output array length should map to the <code>input</code> object keys length.</p>
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>const input = {
    "002004": {
      "25-34 Years": {
        "Jul-20": [
          [
            "Jul-20",
            "002004",
            "002004 - No Description",
            21,
            4,
            "25-34 Years"
          ]
        ],
        "Jun-20": [
          [
            "Jun-20",
            "002004",
            "002004 - No Description",
            25,
            8,
            "25-34 Years"
          ]
        ]
      },
      "35-44 Years": {
        "Jul-20": [
          [
            "Jul-20",
            "002004",
            "002004 - No Description",
            3,
            10,
            "35-44 Years"
          ]
        ],
        "Jun-20": [
          [
            "Jun-20",
            "002004",
            "002004 - No Description",
            4,
            12,
            "35-44 Years"
          ]
        ]
      }
    }
  };
  console.log(input);
  const output = [
    [
      "002004",
      "002004 - No Description",
      21,
      4,
      25,
      8,
      3,
      10,
      4,
      12
    ]
  ]</code></pre>
  </div>
  </div>
  </p>