Jquery unable to retrieve data
<p>I have a variable name <code>columnDatas</code> when I <code>console.log(columnDatas)</code>, I am getting this </p>

<p><a href="https://i.stack.imgur.com/wFArO.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/wFArO.jpg" alt="enter image description here"></a></p>

<p>I want to get name <strong>frmb_escalatedpercentageformarketingexecutives41</strong> in the console.log</p>

<p><a href="https://i.stack.imgur.com/yoodo.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/yoodo.jpg" alt="enter image description here"></a></p>

<p>How can I get this ? Here is the code -</p>

<p>`</p>

<pre><code> var columnDatas = new Array();
    function set_columns(tablename, ele) {
        var ls = $(ele).siblings('.left')[0];
        var rs = $(ele).siblings('.right')[0];      

        if($("#checkPlus").val() != '') {
            var firstTable = $("#tablename").val();
        } else {
            var firstTable = rs.name;
            console.log(columnDatas);                    // HERE IS THE LINE
        }

        if(tablename == "" || (firstTable != undefined &amp;&amp; firstTable == "")) {
            bootbox.alert("&lt;center&gt;&lt;b&gt;Error:&lt;/b&gt; Please Select a Table&lt;/center&gt;");
            $("#tablename").css('border-color','red');
            return;
        }

        if ((rs == undefined || rs == null) &amp;&amp; (ls == undefined || ls == null)) {
            return;
        }

        if (columnDatas != 'null' &amp;&amp; columnDatas[tablename] != undefined) {
            _set_column(ls, tablename);
            _set_column(rs, tablename);
        } else {

            if (columnDatas[tablename] == undefined || columnDatas[tablename] == null) {
            //  $.getJSON('index.php?module=ReportBuilder&amp;action=json_getcolumns&amp;tblname='+tablename+"&amp;dbid="+dbid, function(json) {
                $.getJSON('&lt;?php echo base_url();?&gt;cdashboard/getfields/'+tablename, function(json) {

                    columnDatas[tablename] = json;
                    //_set_column(ls, tablename);
                    _set_column(rs, tablename);
                });
            } 

            if (firstTable != undefined &amp;&amp; firstTable != "") {
            //  $.getJSON('index.php?module=ReportBuilder&amp;action=json_getcolumns&amp;tblname='+tablename+"&amp;dbid="+dbid, function(json) {
                $.getJSON('&lt;?php echo base_url();?&gt;cdashboard/getfields/'+firstTable, function(json) {

                    columnDatas[tablename] = json;
                    _set_column(ls, tablename);
                    //_set_column(rs, tablename);
                });
            } 
        }
    }`
</code></pre>