1
For example:
var carro = {
"modelo": "celta",
"ano": 2007
}
How can I make a generic function that returns the index names of that json, in this case, "model" and "year"?
Something like:
function(json){
//faz o processo
return indices;
}
Possible duplicity! The following issues should solve the proposed problem. http://answall.com/questions/17765/como-pega-o-%C3%adndice-de-um-objeto-javascript-buscando-pelo-valor? Rq=1 http://answall.com/questions/86839/howto filter_data-de-um-json-com-js?rq=1
– Maurivan