2
I have the following names from JSON in this sequence
[
{
"Animal":"Leão"
},
{
"Animal":"Leopardo"
},
{
"Especie":"Aves"
},
{
"Especie":"Mamiferos"
},
{
"Especie":"Répteis"
},
{
"Animal":"Cachorro"
},
{
"Animal":"Gato"
},
{
"Especie":"Peixes"
}
]
Notice that the names that are behind the ':' repeat themselves and are randomly disorganized, I wanted to stay in this model:
Animal:
Lion
Leopard
Dog
Pussycat
Species:
Birds
Nipples
Reptiles
Pisces
I need the exit to be via: echo
organised, as in the second case.
How can I do this? Do I need to use Dictionaries and increase the values in the keys?
Hello Sergio, welcome to Sopt! Enter the JSON that is received. The sequence you placed is not a JSON. This will help someone answer your question more precisely.
– Andrei Coelho
Oh yes, I’m better now
– sYsTeM