I want to get the symbol and other information using the "name" in my array.
$.getJSON("//api.coinmarketcap.com/v1/ticker/?limit=0", function(data) {
var crypto = [
"Ethereum",
"Ripple",
"Tron",
];
// used for array to get length
var arrayLength = crypto.length;
for (var i = 0; i < data.length; i++) {
console.log( data[i].name == crypto[i] );
}
});
I've tried to use:
console.log( data[i].name == crypto[i] );
but can't get this to work. As of now it lists everything when I only want to list data from the items in my array.
I want to get the data in the array using the name to retrieve its information from the API.