Getting data from PHP api

Hi, I must be doing something stupid and got stuck… Any ideas will be much appreciated…

The results key is “data”, but the test just doesn’t like it…

Many thanks in advance…

Fixed, by returning
$str = ‘{“success”: true,“data”:{“test”:[{“a”:“1”, “b”:“2”}]}}’;

Keys are data and test…

Hi @keith_dewey,

Yes, for external collections you need to return array in JSON. Be sure that you have unique ID in each entry
For Custom Actions you can return just a plain JSON (but you won’t be able to iterate array if it exists).
Don’t forget to put content-type: application/json into headers.

Best,
Victor.