We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How am i supposed to code my model section to grab the list of products of a json response as shown bellow?
{ "_embedded": { "products": [ { "_links": { "Primero:codes": { "href": "/codes" } }, "description": "Descripcion Primero", "img_url": "/images/original/missing.png", "legal": "Legal Primero", "name": "Primero", "provider": "Test proveedore", "provider_logo_url": "/logos/original/missing.png", "provider_url": "www.test.com", "steps": "Pasos Primero", "stock": 2, "summary": "Resumen Primero" } ] },
thx in advance.
The text was updated successfully, but these errors were encountered:
$json = json_decode($response->getBody(), true); foreach ($json['_embedded']['products'] as $k => $v) { $description = $v['description']; // and so on }
Sorry, something went wrong.
Thx @ssanders but i need to grab it through service description model....like this:
"models": { "getProductsOutput": { "type": "object", "additionalProperties": { "location": "json", "$ref": "Product" } }, "Product": { "type": "object", "properties": { "name": { "location": "json", "type": "integer" }, "description": { "location": "json", "type": "string" } } } }
Did you figured out how to get the data?
I will close this issue. If your problem still exist with latest versions of Guzzle and Guzzle Service, feel free to reopen it.
No branches or pull requests
How am i supposed to code my model section to grab the list of products of a json response as shown bellow?
thx in advance.
The text was updated successfully, but these errors were encountered: