Hi Uma, You can either set content-type as "application/json" at the back end while sending response object( then browser will automatically parse your json object)
or You can explicitly parse the json object in JavaScript as - var jsonData = JSON.parse(response.data) and access your value as jsonData.statusMessage. Hope this helps. Thanks, Hirdesh On Jun 29, 2016 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. > -- 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.
