Take the 2-minute tour ×
Stack Overflow is a question and answer site for professional and enthusiast programmers. It's 100% free, no registration required.

I am working on a project using Parse.com rest api and Ionic/angularjs.

When I issue a Post request, I would like to get the objectId from the Response body.

I can see that the objectId is included in the response in json format, but I can´t seem to extract it.

var signUp = new SignUp(signUpData);

var response = signUp.$save(); // using angularjs $resource
console.log(response);

When I log the reponse I get this in the console: Object { $$state: Object } "Dotting" into $$state only returns a number.

Any help would be appreciated.

share|improve this question

1 Answer 1

up vote 0 down vote accepted

I never used Parse.com but if you are using $resource code below should works

var signUp = new SignUp(signUpData);

signUp.$save(function(response){

console.log(response);
}); 
share|improve this answer
    
Thank you! That did the trick. –  Simon Apr 10 at 16:23

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.