devNoise
devNoise

Reputation: 374

Parse.com - Best way to get objectID for Parse.Model Object

I keep trying to grab the objectId for the Parse.com Parse.Model object I'm working with. The only success I've had it to use the following:

this.model.toJSON().objectId

This seems to complicated and slow since I should be able to just access a property on the object. Attempts to the use the following have only resulted in a undefined value.

this.model.get("objectId")

Any ideas on what I've missed for accessing this value?

Upvotes: 1

Views: 4452

Answers (1)

Héctor Ramos
Héctor Ramos

Reputation: 9258

You can access the object id through the id property:

this.model.id

Upvotes: 7

Related Questions