#1 2017-02-23 04:55:07

afarias
Member
Registered: 2016-04-13
Posts: 14

Expanded Json

Probably a silly question but can't find out a solution.

Lets say I have

TContact = class(TSQLRecord)

with Name, PhoneNumber properties

If I do

GET /root/Contact

I only get the IDs [{"RowID":1}, {"RowID":2}]

I'd like the get the full objects list, [{"RowID":1, "Name":"Joe", "PhoneNumber":"555-8172"}, {"RowID":2,"Name":"Lucy","PhoneNumber":"555-9182"}]

I've read the docs on NoAJAXJSON but it does not help

Any tips?

Offline

#2 2017-02-23 10:06:41

d.ioannidis
Member
From: Greece
Registered: 2016-06-03
Posts: 20

Re: Expanded Json

Hi afarias,

  try with GET /root/Contact?select=*

regards,


Dimitrios Chr. Ioannidis

Offline

#3 2017-02-23 11:52:11

afarias
Member
Registered: 2016-04-13
Posts: 14

Re: Expanded Json

d.ioannidis wrote:

  try with GET /root/Contact?select=*

Hi ioannidis, that did the trick. Thank you very much.

Do you know a way to make it 'default' so that when someone request /root/contact is "redirected" to /root/contact?select=*

?

Thanks again,
Regards

Offline

Board footer

Powered by FluxBB