How to convert json array to object then chartjs

function grab() {
  return new Promise((resolve, reject) => {
    $.getJSON({
      url: "/hash_results_page/",
      cache: false,
      method: "GET",
      dataType: "JSON",
      success: function (data) {
        resolve(data);
      },
      error: function (error) {
        reject(error);
      },
    });
  });
}
/*DATA_SAMPLE AS FROM JSON = {
                  data: [
                    { x: '2017-01-06 18:39:30', y: 100 },
                    { x: '2017-01-07 18:39:28', y: 101 },
                  ] //just like mine, but mine doesnt have  x: and y;
                };

["2022-12-11 16:45:00",0.491],["2022-12-11 17:00:00",0.464]
    "date     time",    hashvalue

*/
//---------------------------------------------------------------------------
//---------------------------------------------------------------------------
$(document).ready(function (data) {
  grab().then((data) => {
    var ctx = document.getElementById("hashchart").getContext("2d");

    var d1 = data[0];
    var d2 = data[1];
    console.log("Hashrate Data-0:", d1);
    console.log("Average Data-1:", d2);
    //---------------------------------------------------------------------------
                let text = "";
                d1.forEach (function(value) { // lists all entries
                text += value;
                });
                console.log(text);*/

    //var da = JSON.stringify(data[0]); // json array into object - (other way(s) I've tried
    //obj = Object.assign({}, d1);
    //console.log(obj);

    //---------------------------------------------------------------------------
    var dat = [d1];
    var str = JSON.stringify(dat);
    var out = str.substring(1, str.length - 1);
    JSON.parse(out);

    console.log(out);

`what i am trying to do is.. get json results from my api to put onto chartjs
i’ve searched and tried many many things from here, but my skills obviously are limited..
ive shown some of the things ive tried.. here that are commented.. and the uncommented are what i am using currently (i just hope im asking in correct place)

current the code logs (to show) 2 arrays to start… in which, when are opened they show values like are shown above and im trying to seperate or sort to where date/time ofcourse.. is on x axis and the hash values on y axis….. ive used other charting softwares like apexcharts.. but to get it to chart correctly is nothing like this.. and i have apexcharts working at the moment but i like chartjs a bit more.. due to challening myself and flexability.. i just need to get data from the api sorted out.. i hope ive explained good enough and thoroughly to everyones understanding of what i am trying to do here… any help would be much appreciated!!!`

tried several options of js code from s.o.
and anything of my own knowledge and researched for many
many hours..