Hello,
I have tried my best to find it out by myself, but I couldn't.
I am new in Blockly and what I want to do is to make a set of blocks to let my user to connect to my server, decode the JSON code and get 2 values (name and status) of an objects and print them in the output.
SO, here is the simple PHP code that it echo the name and status of one of my objects:
<?php
$data = file_get_contents("myServer");
$objects = json_decode($url, true);
foreach ($objects as $key => $object_key) {
$name = $object_key['name'];
if($name=="Light"){
echo '<b>name:</b>'; echo $object_key['name'];
echo '</br>';
echo '<b>status:</b>'; echo $object_key['status'];
}
}
?>
Thanks in advance for you time and help!

--
You received this message because you are subscribed to the Google Groups "Blockly" group.
To unsubscribe from this group and stop receiving emails from it, send an email to blockly+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.