Grab a list of objects when they are not located at top level of a json response (HATEOAS)

6 views
Skip to first unread message

Richard C Hidalgo Lorite

unread,
Jul 5, 2015, 11:41:50 AM7/5/15
to guz...@googlegroups.com
Sorry for my question. I¡m a newbie for guzzle services using v5 version.

How am i supposed to code my model section to grab the list of products of a json response as show 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.
Reply all
Reply to author
Forward
0 new messages