I have a JSON as follows
{
columns : [RULE_ID,COUNTRY_CODE],
RULE_ID : [1,2,3,7,9,101,102,103,104,105,106,4,5,100,30],
COUNTRY_CODE : [US,US,CA,US,FR,GB,GB,UM,AF,AF,AL,CA,US,US,US]
}
I need to retrive the column names from the columns entry and then use it to search the rest of the entries using jquery. For example I get each column using
jQuery.each(data.columns, function(i,column))
I need to loop throgh the rest of the entries using the values I get from the previous loop. ie without hardcoding COUNTRY_CODE or RULE_ID. What is the best way to do that using Jquery?