0

I am getting the response object as :

{"emailID":{"__type":"Pointer","className":"Employees","objectId":"Ap8MmrvYUl"},"slotNo":{"__type":"Pointer","className":"ParkingSlots","objectId":"ASyr5tgBtl"},"vehicleType":{"__type":"Pointer","className":"TypeOfVehicle","objectId":"F5R4VRExA6"},"isDeallocated":false,"isReserved":false,"allocatedDate":{"__type":"Date","iso":"2014-02-11T09:50:00.000Z"},"objectId":"earFXqNB65","createdAt":"2014-02-11T09:50:38.169Z","updatedAt":"2014-02-11T09:53:05.794Z","__type":"Object","className":"ParkingAllocationStatus"}

Needed:

I want to get the iso value of allocatedDate, tried using the

var obj = object.get("allocatedDate");
console.log(obj.iso);

But resulted in error like : get is not a function or undefined.

RONE
  • 5,415
  • 9
  • 42
  • 71
  • 1
    What's `.get()` supposed to be? If that's a JavaScript object all you need is `object.allocatedDate.iso` – Pointy Feb 11 '14 at 15:13
  • possible duplicate of [Access / process (nested) objects, arrays or JSON](http://stackoverflow.com/questions/11922383/access-process-nested-objects-arrays-or-json) – Felix Kling Feb 12 '14 at 03:34
  • @FelixKling, dear friend, i tried this way, but it is not allowing, says "iso" is undefined. Note: i am using parse.com/docs SDK, not normal javascript – RONE Feb 12 '14 at 03:38
  • Maybe you should provide some more context and post more of your code. I find the documentation pretty self explanatory actually: https://parse.com/docs/js_guide#objects. – Felix Kling Feb 12 '14 at 03:41

0 Answers0