How can I convert multidimensional object to table row column format in javascript
<p>I have got a multidimensional object in my ajax response. Here is the object   </p>

<pre><code> response = {
             "Bangladesh": {
                 "2016": 5,
                 "2017": 1
            },
            "Nepal": {
                "2016": 1,
                "2019": 10
            }
    };
</code></pre>

<p>Now I want to rearrange that array to a google chart Data table format as bellow</p>

<pre><code>['Year', 'banglladesh', 'nepal' ],
['2016', 5,1],
['2017',  1,0],
['2019',  0, 10],
</code></pre>