[Solved] How to check null value in json?


Try this code ,

    var data = {
         "mname": [
             {
                "Mname": "abc",
                "pname": [],
                "rewards": null
             }
          ]
     }

     $.each( data.mname , function( key, value ) {
         if(value.rewards == null || value.rewards == undefined){
                 // Add your codes/logic
         }
     });

1

solved How to check null value in json?