How to read JSon boolen and number values? :  I send a JSon object to server by creating as :

     var input_array =self.input_value();
			
			myJson={ 
			        request_type:1,   //send request for problem 1
					list_empty: 0,    //1 is empty, 0 is not empty
					data_list:[]
			       };
				   
			for(var k=0;k<input_array.length;k++)
			{
				myJson.data_list[k]=input_array[k];
			}

On the server 
   
    var data=req.body;	
    console.log("request_type: ",req.body.request_type);  // worked

	var m_bool= Number(data.list_empty);
	if( m_bool != 0)
	{
		console.log("data_list size: ",data.data_list.length);
		for(var i=0;i<data.data_list.length;i++)
		{
			console.log(data.data_list[i]);
		}
	}
   
It stopped just  after printing second line. I think it can't read 
"list_empty" field of JSon. I changed to 
    
    ...    
    list_empty: false,
    ...

still server did not enter in "if" statement. without the if statement I been able to print the array elements.

I think I am failing to read "list_empty"'s value. 

so how can I enter inside the if statement?

 
     