score:1

let temp = {
  "display": {
    "2019-12-05 07:15:00": {
      "1. open": "1.1083",
      "2. high": "1.1084",
      "3. low": "1.1081",
      "4. close": "1.1083"
    },
    "2019-12-05 07:10:00": {
      "1. open": "1.1084",
      "2. high": "1.1084",
      "3. low": "1.1079",
      "4. close": "1.1083"
    },
    "2019-12-05 07:05:00": {
      "1. open": "1.1082",
      "2. high": "1.1084",
      "3. low": "1.1080",
      "4. close": "1.1084"
    },
    "2019-12-05 07:00:00": {
      "1. open": "1.1082",
      "2. high": "1.1083",
      "3. low": "1.1079",
      "4. close": "1.1082"
    },
    "2019-12-05 06:55:00": {
      "1. open": "1.1083",
      "2. high": "1.1084",
      "3. low": "1.1080",
      "4. close": "1.1082"
    },
    "2019-12-05 06:50:00": {
      "1. open": "1.1081",
      "2. high": "1.1083",
      "3. low": "1.1080",
      "4. close": "1.1083"
    },
    "2019-12-05 06:45:00": {
      "1. open": "1.1081",
      "2. high": "1.1082",
      "3. low": "1.1079",
      "4. close": "1.1081"
    },
    "2019-12-05 06:40:00": {
      "1. open": "1.1081",
      "2. high": "1.1082",
      "3. low": "1.1079",
      "4. close": "1.1081"
    },
    "2019-12-05 06:35:00": {
      "1. open": "1.1082",
      "2. high": "1.1082",
      "3. low": "1.1080",
      "4. close": "1.1081"
    },
    "2019-12-05 06:30:00": {
      "1. open": "1.1081",
      "2. high": "1.1083",
      "3. low": "1.1080",
      "4. close": "1.1081"
    }
  }
};

let display = temp.display;

let ans = [];

Object.keys(display).forEach((key) => {

  ans.push({
    "date": key.split(" ")[0],
    "timestamp": key.split(" ")[1],
  });

});

console.log(ans);

Related Query

More Query from same tag