jquery - how to check in the json object key-value pair that the value is a string or it is a object which has more data in it? -


hi guys have json follows :

{    "data": [    {     "grkey": "00",    "itm_no": "00",    "zzformat": "",    "werks": "",   "matkl": "",    "matnr": "test123",    "regio": "mah",    "brand_id": "",    "kbetr": "0.00",    "remarks": "test123",    "kappl": "",    "delete": ""     },     {      "grkey": "00",     "itm_no": "00",     "zzformat": "",     "werks": "",     "matkl": "",     "matnr": "test1",      "regio": "mah",     "brand_id": "",     "kbetr": {     "0.00": [       {         "0": "3",         "1": "sales team allowance",         "2": "5"       },       {         "0": "4",         "1": "product listing fee",         "2": "0"       },       {         "0": "12",         "1": "data sharing",         "2": "0"           }         ]         },       "remarks": "test1",       "kappl": "",       "delete": ""       }     ]     } 

we can see in data object first set of data has kbetr value string , 1 has kbetr object.
how identify whether kbetr key has value normal string value or object.

thanks.


Comments

Popular posts from this blog

angular - Ionic slides - dynamically add slides before and after -

minify - Minimizing css files -

Add a dynamic header in angular 2 http provider -