鉴于此数据结构,我需要进行每个计算(“ totalAssets”-“ shareholderEquity”)。在javascript中效果如何。非常感谢。
{
"symbol": "FB",
"financials": [
{
"reportDate": "2017-12-31",
"totalAssets": 84524000000,
"totalLiabilities": null,
"shareholderEquity": 74347000000,
},
{
"reportDate": "2016-12-31",
"totalAssets": 64961000000,
"totalLiabilities": null,
"shareholderEquity": 59194000000,
},
{
"reportDate": "2015-12-31",
"totalAssets": 49407000000,
"totalLiabilities": null,
"shareholderEquity": 44218000000,
},
{
"reportDate": "2014-12-31",
"totalAssets": 39966000000,
"totalLiabilities": null,
"shareholderEquity": 36096000000,
}
]
}
答案 0 :(得分:0)
答案 1 :(得分:0)
var i = 0;
$('.slick-next').click(function(){
console.log('next clicked');
i++;
console.log(i);
if (i==1) {
$('#people').css('filter', 'none');
}
})