Javascript examples for JSon:JSon String
Get JSON property from fully qualified string
<html> <head> <meta name="viewport" content="width=device-width, initial-scale=1"> <script type="text/javascript"> window.onload=function(){//from w w w . ja v a 2s . c om var a = { "b": { "c": 1 } } var n = "d.c".split("."); var x = a; for (var i = 0; i < n.length; i++) { x = x[n[i]]; if (typeof(x) == "undefined") { break; } } console.log(x); } </script> </head> <body> </body> </html>