I am in need of creating a state for multiple elements displayed on a web page. The states are limited to 1 or -1.
My approach is to generate a JSON array on the server side and then embed it into my .aspx page like this:
var someArray = { 100:-1, 1001:1, 102:1, 103:-1 }
What's the best method for looping through each value using JavaScript?
Also, I would appreciate any feedback on whether my JSON array formatting is correct.