I am doing a `json_encode` method on results from a table. 

When I do a `var_dump` on this variable. I get three objects.

```
{"id": "5"}
{"id": "6"}
{"id": "7"}

```

So here is my process.
I have an image with an onclick method.

```
<input type='image' onclick='download(".$z.")'>

```

Here is what the button looks like in my developer tools.

```
<input type="image" src="image.jpg" onclick=download({"id":"13","itemName":"","itemDesc":"","imageURL":"","language":"English (US)","category":"Presentation","size":"1970 KB","flagDesc":"","fileType":"PPTX"})">

```

Here is the method I am using. My method doesn't pick up all my objects. It only picks up the last object. Why?

```
        function download(z)
    {
        $.ajax({
            type: 'POST',
            url:'download.php',
            data: { image: JSON.stringify(z) },
            success:function(results){
                $('div').html(results);
            }
        });
    }

```

In my download.php file I am doing a dump of the `json_decode($_POST['image']);`

I get the same object back a number of times, but just only one object. How do I get them all?