A
A
Andrey Kanaev2016-11-02 22:53:16
Angular
Andrey Kanaev, 2016-11-02 22:53:16

How to refer to the json element containing the dog in src?

Good evening. There is xml

<Images><Image url="http://site.ru/default/common/misc/file/car_photo/1615/XW8LB25L7DH714256/11c9787d0e324d799faf30e6eaf4ad22.jpg"/><Image url="http://site.ru/default/common/misc/file/car_photo/1615/XW8LB25L7DH714256/7b517e2725304e3279c69150267727c9.jpg"/><Image url="http://site.ru/default/common/misc/file/car_photo/1615/XW8LB25L7DH714256/1982c64d20f859dbfd8b41e1ffc32fbf.jpg"/><Image url="http://site.ru/default/common/misc/file/car_photo/1615/XW8LB25L7DH714256/a0c15e79f14b08effc94a5272dc1f86d.jpg"/><Image url="http://site.ru/default/common/misc/file/car_photo/1615/XW8LB25L7DH714256/52d96b8ddf196f6a540b46943615b2f8.jpg"/><Image url="http://site.ru/default/common/misc/file/car_photo/1615/XW8LB25L7DH714256/b2c7f509315fc5ab1c649eaa5cefdaad.jpg"/><Image url="http://site.ru/default/common/misc/file/car_photo/1615/XW8LB25L7DH714256/994f6bbbab5fb013671b822ba52d1c7e.jpg"/></Images>

using php, I hook it up and give json angular. I get an object called @attributes that contains the url. AngularJs swears at this dog how to be?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
Stac, 2016-11-10
@Stac

Take the dog away.
Nothing prevents you from making JSON of the desired form on the PHP side , for example
: /car_photo/1615/XW... ", " site.ru/default/common/misc/file/car_photo/1615/XW... ", " site.ru/default/common/misc/file/car_photo/1615 /XW... " ] and access the elements of the resulting array by index.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question