Working with JSON

 

<DOCTYPE html>
<html>
    <head>
        <meta CHARSET="UTF-8">
        <script src="http://ajax.googleapis.com/ajax/libs/angularjs/1.4.8/angular.min.js"></script>
    </head>
    <body ng-app="myApp" ng-controller="myCtrl">
        <h2>JSON</h2>
        <fieldset>
            <legend>
                String
            </legend>
            <div ng-init='name = {"first_name":"Shailesh", "last_name" : "Sonare"}'>
                {{name.first_name}} <br/>
                {{name.last_name}}
            </div>
        </fieldset>
        <fieldset>
            <legend>
                Numbers
            </legend>
            <div ng-init='months = {"jan": 1, "feb" : 2}'>
                {{months.jan}} <br/>
                {{months.feb}}
            </div>
        </fieldset>
        <fieldset>
            <legend>
                Objecs
            </legend>
            <div ng-init='result = {employee:{"name": "Shailesh", "age" : 28}}'>
                {{result.employee.name}} <br/>
                {{result.employee.age}}
            </div>
        </fieldset>
        <fieldset>
            <legend>
                Array
            </legend>
            <div ng-init='result = {employee:[{"name": "Shailesh", "age" : 28},{"name": "Mahesh", "age" : 26}]}'>
                {{result.employee[0].name}} <br/>
                {{result.employee[1].age}}
            </div>
            <div ng-init='result2 = {months:["Jan","Feb"]}'>
                {{result2.months[0]}} <br/>
                {{result2.months[1]}}
            </div>
        </fieldset>
    </body>
    <script>
        var app = angular.module("myApp", []);
        app.controller("myCtrl", function($scope) {

        });
    </script>
</html>

 

 

16 Replies to “Working with JSON”

  1. My spouse and I stumbled over here coming from a different page and thought I should check things out. I like what I see so now i am following you. Look forward to looking over your web page repeatedly.

  2. It’s appropriate time to make some plans for the long run and it is time to be happy. I’ve learn this submit and if I may I wish to recommend you few fascinating issues or advice. Perhaps you could write next articles relating to this article. I desire to read more issues approximately it!

  3. I don’t even know how I ended up here, but I thought this post was good. I don’t know who you are but certainly you’re going to a famous blogger if you are not already 😉 Cheers!

  4. It’s not my first time to pay a quick visit this web page, i am visiting this website dailly and get fastidious information from here all the time.

  5. It’s remarkable to pay a quick visit this website and reading the views of all friends regarding this post, while I am also zealous of getting experience.

  6. For those seeking an exceptional online gaming experience, us.com](https://maxispin.us.com/) stands out as a premier destination. At Maxispin Casino, players can enjoy a vast array of pokies, table games, and other thrilling options, all accessible in both demo and real-money modes. The casino offers attractive bonuses, including free spins and a generous welcome offer, along with cashback promotions and engaging tournaments. To ensure a seamless experience, Maxispin provides various payment methods, efficient withdrawal processes, and reliable customer support through live chat. Security is a top priority, with robust safety measures and a strong focus on responsible gambling tools. Players can easily navigate the site, with detailed guides on account creation, verification, and payment methods. Whether you’re interested in high RTP slots, hold and win pokies, or the latest slot releases, Maxispin Casino delivers a user-friendly and secure platform. Explore their terms and conditions, read reviews, and discover why many consider Maxispin a legitimate and trustworthy choice in Australia.
    The platform provides state-of-the-art tools to create unique and captivating text content.

    **Features of MaxiSpin.us.com**
    One of the standout features of MaxiSpin.us.com is its ability to generate content in multiple languages.

    **Benefits of Using MaxiSpin.us.com**
    This conservation of time and resources allows businesses to concentrate on other vital areas of their operations.

  7. You can definitely see your skills within the work you write. The world hopes for even more passionate writers like you who aren’t afraid to say how they believe. At all times go after your heart.

Leave a Reply to av 女優 Cancel reply

Your email address will not be published.