I have the JSON file input.json:
{
"consumner_key": {
"display_name": "CONSUMER-KEY:",
"name":"consumer_key",
"format": "string",
"type": "textbox",
"isMandatory": "true"
},
"secret_key": {
"display_name": "CONSUMER-SECRET:",
"name":"consumer_secret",
"format": "string",
"type": "textbox",
"isMandatory": "true"
}
}
I am using $.getJSON() to get the JSON file and parse it:
$.getJSON('input.json',function jsonData(Data)
{
$.each(Data, function(m,field)
{
console.log(m);
$('#tabs-4 social').append('<input></input>').attr({type:'text',name:this.consumner_key+''+this.name});
$('#tabs-4 social').append('<input></input>').attr({type:'text',name:this.secret_key+''+this.name});
});
});
When I run it I am not able to view the input boxes in my tabs. Kindly point to where I am going wrong.