[Solved] Javascript: Create new arrays from a url of object of arrays


You can simply get the data by key:

data.performance.fundBtcArr ,data.performance.fundUsdArr,data.performance.btcUsdArr

var data={"performance": {"datesArr": ["2018-04-30", "2018-05-07", "2018-05-14", 
    "2018-05-21", "2018-05-28", "2018-06-04", "2018-06-11", "2018-06-18", "2018-06-25", "2018-07-02", "2018-07-09"], 
    "fundBtcArr": [1, 0.956157566, 0.988963214, 0.992333066, 1.118842298, 1.064376568, 1.109733638, 1.082080679, 1.142624866, 
        1.1107828743809005, 1.0626307952408292], 
        "fundUsdArr": [1, 0.974710531, 0.944055086, 0.903073518, 0.869041365, 0.870284702, 0.815468401, 0.789070479, 
            0.777083258, 0.8027552300742684, 0.7766297878480255], 
            "btcUsdArr": [1, 1.019403669, 0.954590699, 0.910050818, 0.77673267, 0.81764737, 0.734832552, 0.729215939, 0.680086073, 
                0.7226932000744855, 0.7308557133166972]

                }}
                
     //console.log(data.performance.datesArr);              
   var  fundBtcArr=data.performance.fundBtcArr ;
   fundBtcArr.unshift('fund/Btc %');
 
  console.log(fundBtcArr); 
  var  fundUsdArr=data.performance.fundUsdArr ;
  fundUsdArr.unshift('fund/Usd %');
   console.log(fundUsdArr); 
   var  btcUsdArr=data.performance.btcUsdArr ;
  btcUsdArr.unshift('btc/Usd %');
   console.log(btcUsdArr);

solved Javascript: Create new arrays from a url of object of arrays