i'm looking use url object...located in object. example here image url (located in object user, object picture, object data, url)
from console :
object {id: "10153995795744213", picture: object} picture:object data:object url:"https://scontent.xx.fbcdn.net/v/t1.0-1/p50x50/12963402_10153790184054213_2959661679219024256_n.jpg?oh=c04814c77c6e5e507b1e6dd08e40d50e&oe=582c5564"
php
$user=json_decode($_post["user"],true); $id = $user["id"]; $image = $user->picture->data->url;
ajax
$.ajax({ type: "post", url: "http://www.website.com/test.php", data: {user:json.stringify(user)},
i got id correctly not url
do know how can url ? :)
thanks lot
i managed url changing php :
$user=json_decode($_post["user"],true); $id = $user["id"]; $picture = $user["picture"]; $data = $picture["data"]; $url = $data["url"];
Comments
Post a Comment