matthewcheok / Realm-JSON

A concise Mantle-like way of working with Realm and JSON.
MIT License
661 stars 129 forks source link

Transform object into integer #96

Open dielsonsales opened 8 years ago

dielsonsales commented 8 years ago

Let's say my object has a property which is a RLMArray of another object. I want to map each object of this array into a single int (which is its id) in the resulting JSON. How would I do that? Is that possible?

Something like:

[object1, object2, object3] => [1, 2, 3]

... where 1 is the object1.identifier, 2 is the object2.identifier etc.