I'm passing an object created in a jQuery file to php and getting it by the following code.
$data = $_POST['data'];
$d = json_decode($data);
$user = $d->user;
$season = $d->season;
print_r($d);
What is returning me the following:
stdClass Object
(
[user] => 1
[season] => 2016
[week201548] => stdClass Object
(
[bloco] => Microciclo
[day24112015] => stdClass Object
(
[z1] => 0
[z2] => 0
[z3] => 0
[z4] => 0
[z5] => 0
[z6] => 0
[z7] => 0
[terrain] => Terreno
[rpe] => 7
[elevation] => 1861
[fc] => 140
[time] => 250
[distance] => 86
[training] =>
[color] =>
)
[day25112015] => stdClass Object
(
[z1] => 0
[z2] => 0
[z3] => 0
[z4] => 0
[z5] => 0
[z6] => 0
[z7] => 0
[terrain] => Terreno
[rpe] => 7
[elevation] => 1861
[fc] => 140
[time] => 250
[distance] => 86
[training] =>
[color] =>
)
[day26112015] => stdClass Object
(
My question is, how do I change only one value of this object?
For example, only [elevation]
of [day24112015]