I have the following JSON (complete):
{
"name": "Romano Pesca",
"count": 8,
"frequency": "Weekly",
"version": 5,
"newdata": false,
"lastrunstatus": "success",
"thisversionstatus": "success",
"nextrun": "Sat Aug 08 2015 15:14:57 GMT+0000 (UTC)",
"thisversionrun": "Sat Aug 01 2015 15:14:57 GMT+0000 (UTC)",
"results": {
"collection1": [
{
"img": {
"alt": "Vara Sumax Victória 9'0\" ( 2,70m ) Para Carretilha",
"href": "http://www.romanopesca.com.br/vara-sumax-victoria-9-0-2-70m-para-carretilha.php",
"src": "http://www.romanopesca.com.br/media/catalog/product/cache/1/small_image/135x/9df78eab33525d08d6e5fb8d27136e95/s/u/sumax-080357_1.jpg",
"text": ""
},
"prod": {
"href": "http://www.romanopesca.com.br/vara-sumax-victoria-9-0-2-70m-para-carretilha.php",
"text": "Vara Sumax Victória 9'0\" ( 2,70m ) Para Carretilha"
},
"valor": "R$242,91",
"index": 1,
"url": "http://www.romanopesca.com.br/"
},
I need to put the values that are inside the keys "prod" - > "text" in CAPITAL LETTER.
"results": {
"collection1": [
{
"prod": {
"text": "ARA SUMAX VICTÓRIA 9'0" ( 2,70M ) PARA CARRETILHA"
},
I have the following code for php cases:
<?php
$request ="https://www.kimonolabs.com/api/7fzc196k?apikey=9TCUO9EskMyL4HtmqHMNDIiaZ9KmOcXn";
$response = file_get_contents($request);
$results = json_decode($response, TRUE);
array_walk_recursive($results, function ($value)
{
$value = mb_strtoupper($value, 'UTF-8');
});
$meu_json_tudo_maiusculo = json_encode($results);
?>
I also thought about using a function in javascript, instead of php, to change the JSON result, leaving it uppercase.
So far the above code is not working.