I creating a json output and this is how it looks right now :
{"attributes":{"next":4189646},"images":{"0":{"id":"4188043","title":"Easter Island ....
but I want it to look like:
{"attributes":{"next":4197237},"images":[{"id":4198434,"title":"Good Morning" ...
how can I get rid of the images array IDs??
In order for an array to be encoded as
[...]rather than{"0":...}, the array must be a “pure” indexed array.This can easily be achieved by running it through
array_values()first.