I have a variable like this:
$scope.task.gallery=[
{"name": "XCB808tvXNpqXKqekA2HlkJ8H.jpg","size":5112},
{"name": "s6kA6B0e5m1sdSAjPXqNwtiy4.jpg", "size": 13135}
];
But when get this in server, show me object without quotation:
[
{name: "XCB808tvXNpqXKqekA2HlkJ8H.jpg",size:5112},
{name: "s6kA6B0e5m1sdSAjPXqNwtiy4.jpg", size: 13135}
];
I use php Laravel 5.1 for backend in server. when I send with Restangular
and use json_decode
send me error json_decode() expects parameter 1 to be string, array given
.
I think Restangular
change variable and then send. how to send array object JSON as real ?
via Chebli Mohamed
Aucun commentaire:
Enregistrer un commentaire