If I had the following JSON,
[{},{"param":"#content","value":"K2-12M","quantity":1,"q_id":3,"clear":1}
{"param":"#content","value":"K2-12F","quantity":2,"q_id":3,"clear":0}]
In js/jquery, how would I loop through, and if any of the items have "clear":0, then set ALL items to "clear":0 ?
or using jQuery (this is less efficient):