i am getting the expected result to json format. I want the icon to be changed when i click on id "#imp" with respect to the status field in db. The value in database are updating as i click but icon are not changed. I am getting problem when using if statement inside class to toggle between classes according to the status coming from json. I tried this code but it didn't worked for me. Any other good solution would be greatful for me. Thank you. i am getting the expected result to json format