Convert from stringify to boolean

Convert from stringify to boolean

Hi,

I am using below:

  1. Savanna.savanna_admin = JSON.stringify(data[0].savanna_admin);

to get the bit value from MySQL and it returns:

  1. "\"1\""

How can I make this converted to true and when it's "\"0\"" then to be as false?


Thanks,