$.getJSON( "ajax/test.json", function( data ) {
  var items = [];
  $.each( data, function( key, val ) {
    items.push( "<li id='" + key + "'>" + val + "</li>" );
  });

  $( "<ul/>", {
    "class": "my-new-list",
    html: items.join( "" )
  }).appendTo( "body" );
});

try this code. change your json url and use your object.


Thanks:
Ketan Patel
*Mo: *+91 9974855537 <+919974855537>

On Wed, Jun 29, 2016 at 11:51 AM, Uma Chikkegowda <[email protected]>
wrote:

> hi ,
> i am new to angular js i have a issue.
>
> my http response gives below json i need access 2 values in this and alert
> a window in ui
>
> Object {id: null, operationStatus: true, statusMessage:
> "TB::testBedName::FS::OODS faultSet::TS::2016-06-29 11:41:37.716"}
>
> i need to access operationstatus then process statsus message
>
> here is my code
> *function(d) {*
> *     console.log(d);*
> *     if ((d.data[0].operationStatus)== false ){*
> *     $window.alert(d.data.statusMessage);*
> *     }*
>
> but i am gettting error as operation status is undefined
>
>
> kindly help
>
> Thanks
> Uma
>
> --
> You received this message because you are subscribed to the Google Groups
> "AngularJS" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To post to this group, send email to [email protected].
> Visit this group at https://groups.google.com/group/angular.
> For more options, visit https://groups.google.com/d/optout.
>

-- 

*----------------------------------------------------------------Professional 
Development: Please join us...*
Social Media HR:  From Risk Reduction to Recruitment 
<http://learn.108ideaspace.com/social-media-hr-from-risk-reduction-to-recruitment/>
 
 (Apr 12, 2016 - webinar)
Implementing CRM <http://learn.108ideaspace.com/implementing-crm/>  (May 
10, 2016 - webinar)
Register for our entire 2016 webinar series 
<http://learn.108ideaspace.com/108-webinar-series-2016/>

*----------------------------------------------------------------*
*This e-mail is confidential. If you are not an intended recipient, please 
delete this e-mail and notify us immediately. Any unauthorized use or 
disclosure is prohibited.                *
*Copyright (c) 2016  108 ideaspace inc.*

-- 
You received this message because you are subscribed to the Google Groups 
"AngularJS" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.

Reply via email to