I have a JSON Object which is dynamically created based on user interaction, the dynamic key will change every time
example JSON
{
"normalkey": "John Smith",
"dynamickey ": "testing"
}
is there any way to assign the dynamic key name without knowing the key name for example.
$.ajax({
type: "POST",
url: ROOT+"controlpanel/menuBuilder",
data: "clicked="+menu,
dataType:"json",
success: function(data)
{
$('#foo').html(data.normalKey);
$('#bar').html(data.dynamicKey);
}