score:0

try this out:

var data = [
  {
    "asset_id": "doge",
    "name": "dogecoin",
    "type_is_crypto": 1,
    "data_start": "2014-02-21",
    "data_end": "2021-02-13",
    "data_quote_start": "2014-07-31t13:05:46.0000000z",
    "data_quote_end": "2021-02-13t18:11:23.9210000z",
    "data_orderbook_start": "2014-07-31t13:05:46.0000000z",
    "data_orderbook_end": "2020-08-05t14:37:58.7197513z",
    "data_trade_start": "2014-02-21t05:16:16.8330000z",
    "data_trade_end": "2021-02-13t18:12:51.7190000z",
    "data_symbols_count": 5087,
    "volume_1hrs_usd": 2344753752.07,
    "volume_1day_usd": 90403357198.90,
    "volume_1mth_usd": 12757493880306.16,
    "price_usd": 0.06774975,
    "id_icon": "63e240f3-047f-41c7-9179-6784bc719f63"
  },
  {
    "asset_id": "ada",
    "name": "cardano",
    "type_is_crypto": 1,
    "data_start": "2017-09-29",
    "data_end": "2021-02-13",
    "data_quote_start": "2017-09-29t07:11:06.6463948z",
    "data_quote_end": "2021-02-13t18:11:58.5984612z",
    "data_orderbook_start": "2017-09-29t07:11:06.6463948z",
    "data_orderbook_end": "2020-08-05t14:37:58.7010000z",
    "data_trade_start": "2017-10-01t20:08:31.0000000z",
    "data_trade_end": "2021-02-13t18:12:42.5550000z",
    "data_symbols_count": 291,
    "volume_1hrs_usd": 115032462.37,
    "volume_1day_usd": 3962452344.40,
    "volume_1mth_usd": 147189367042.86,
    "price_usd": 0.873287,
    "id_icon": "2701173b-1b77-40f2-8693-9659359e225c"
  }
]

var labels = [];
var prices = [];

data.foreach(entry => {
    labels.push(entry["asset_id"]);
    prices.push(entry["price_usd"]);
});

console.log('labels: ', labels);
console.log('data: ', prices);


Related Query

More Query from same tag