1
They say that Json is simple. But I’m in a lot of pain.
Following code:
$(document).ready(function(){
$.get( "http://meusite.com/", function(data) {
console.log(data);
});
});
the result the console.log is
[
{"id":"769","cidade":"minhacidade","estado":"PR"},
{"id":"855","cidade":"Caram","estado":"PR"}
]
Exactly what I need. (so far I have) But from that point on, I can’t get out. I need to manipulate these results.Break into pieces.
By in Divs.
But I can’t (I googled all) anything right.
What I have to do so that I can put ex:
Print the second city ID on the screen.
The second state
And so on because this Json will grow and grow.
You can give an example of what HTML should look like?
– Sergio
Look, just teaching me how to put a die of this Json in a simple DIV. The rest I do. For example (Id 2) in a DIV. I don’t need anything else
– Uriel