JavaScript: Comparing the current value to the previous value drawn from Json
I was not sure how to write the question title or what is the correct way to ask for this question. The goal is, I am currently drawing data from an external Json file that have about 700 or more data. What I want to do is, when looping through these data, for example, data 1, data 2, data 3...so on, I want the current value to be compared to the previous value and if it is greater, lesser, or equal to, then do something right now, my code is written like this function myJson() { $.getJSON('JsonData.json', function (response) { setInterval(function () { var TrialCount = response.length; update
0 upvotes
View original discussion ↗
Comments
Sign in or sign up to comment and upvote.
No comments yet.