EDIT - What is the purpose of marking a question as duplicate? Earn some points and get a little wiseass kick? You cannot know that this question will not help someone. The answers to the question that this "duplicated" would not have answered my question in my limited knowledge, but the gentleman who answered MY question did. -EDIT
I am looking to select just one value from a list of JSON data, the 24 hr price percentage change:
{
"id": "stellar",
"name": "Stellar",
"symbol": "XLM",
"rank": "6",
"price_usd": "0.570132",
"price_btc": "0.00005009",
"24h_volume_usd": "672209000.0",
"market_cap_usd": "10187093680.0",
"available_supply": "17867956333.0",
"total_supply": "103629819514",
"max_supply": null,
"percent_change_1h": "1.8",
"percent_change_24h": "16.65",
"percent_change_7d": "23.95",
"last_updated": "1516839244"
}
and at the moment, my current code, which is just to test if what I have thus far works at all, returns simply [object Object]
:
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<script>
$(document).ready(function () {
$.getJSON('https://api.coinmarketcap.com/v1/ticker/stellar/',
function (data) {
document.body.append(data);
});
});
</script>
I want to isolate - and to start, just to show - only that "percent_change_24h"
and work from there.
Thank you.