I can't get the id field from a QBCustomObject after retrieving them from the database. I tried:
customObject.getId()
customObject.get("id")
customObject.get("_id")
But both of them return null. The response of the get request is:
'{"class_name":"Commento","skip":0,"limit":0,"items":[{"_id":"58764867a28f9a83b00000d6","_parent_id":null,"created_at":1484146791,"post_id":"news1542333154","testo":"un commento","updated_at":1484146791,"user_id":22399324},{"_id":"58764865a0eb47eecc00003a","_parent_id":null,"created_at":1484146789,"post_id":"news1542333154","testo":"un commento","updated_at":1484146789,"user_id":22399324}]}'
The value I'm trying to get is "58764867a28f9a83b00000d6".
What is the correct way?
I found out that the correct way is to call customObject.getCustomId()