Read the value from Web.config file

Read the value from Web.config file

I am using .js file. I want to read the value from Web.Config by Key. I am using this code, but it's not working.

var appSetting = '@(System.Configuration.ConfigurationManager.AppSettings["systemAdministrator"].ToString())';


It should take the whole value as string. Can anyone pls help how to get the value ?