topical media & game development

talk show tell print

professional-ajax-07-General-JSON-Examples-LiteralsExample.htm / htm



  <html>
      <head>
          <title>Literals Example</title>
      </head>
      <body>
          <script type="text/javascript">
              var oCar = {
                  "color" :  "red",
                  "doors" : 4,
                  "paidFor" : true
              };
  
              alert(oCar.color);     //outputs "red"
              alert(oCar.doors);     //outputs "4"
              alert(oCar.paidFor);   //outputs "true"
          
          </script>    
      </body>
  </html>


(C) Æliens 20/2/2008

You may not copy or print any of this material without explicit permission of the author or the publisher. In case of other copyright issues, contact the author.