0

basically i know how to get a json from PHP,
now i have to get 2 classes from JSON:Login and References
using this code

$data = json_decode(file_get_contents('php://input'), true);

gives me this result:

{\"Login\":{\"username\":\"user\",\"password\":\"pass\"},
\"Reference\":[{\"IdReception\":\"1\",\"OrderNum\":null,\"Visit\":null]}

but how can i separate Login and Reference? i need to read all References and just 1 time the Login class in the JSON passed,
From google i can find only examples with one class in the JSON
Thanks

sam
  • 11
  • 4

0 Answers0