Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 174
  • Last Modified:

ajax call how do i get an object inside the object that is returned in the success function???

if the object that is returned has a object that is a member of that object how do i pull out their members in the success function??

object1
{
   public object2 obj;

}

success(object1){
how do i get object 1 members?

}
0
cbrune
Asked:
cbrune
1 Solution
 
EyalCommented:
object1.object2
0
 
leakim971PluritechnicianCommented:
success(object1){

for(var j in object1) {
    alert(  "key is : " + j + "\nvalue is : " + object1[j]  )
}

alert( "whole object as string : " + JSON.stringify(object1)  );

}
0
 
cbruneAuthor Commented:
u mean obj2 members??
0

Featured Post

Vote for the Most Valuable Expert

It’s time to recognize experts that go above and beyond with helpful solutions and engagement on site. Choose from the top experts in the Hall of Fame or on the right rail of your favorite topic page. Look for the blue “Nominate” button on their profile to vote.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now