fixed bug with multiple switches
changing json on checkbox changes