How to manipulate a json

0

I have a json object composed of two arrangements:

{
  "letras": [
    "a",
    "b",
    "c"
   ],
  "numeros": [
     5,
     6,
     7
   ]
}

Which sent from my controller as follows:

$response = new JsonResponse();
    $response->setData(array($letras,$numeros));

    return $response;

my question is .. how can I go through and print that $ response (json) in the view, separate the arrays and their elements, to use them independently in the view.

    
asked by matteo 01.08.2018 в 18:27
source

0 answers