Thanks for the replies. I have tried it like this however it doesn't work, but the result is different. Instead of it throwing an error like cannot find member 'ID', the echo actually outputs 0. So it must have passed a type of some kind. I tried echoing more properties on the 'obj' and the values o...