I got these data return from PHP script in JSON format.
{
"inherited_items":{1:"Role Num1",2:"Role Num2",3:"Role Num3"},
"available_items":{4:"Role Num4",6:"Role Num5",6:"Role Num6"}
}
How do I set this values as options to my select input? I came to this question " Jquery getJSON populate select menu question", but the solution will not work for me. It is because the JSON data I have does not have a uniform index to the array values. Is there a way to set the data as option values with out reformatting the JSON data from the PHP script. As the index of the arrays are important to me.
By the way, the JSON data that I have will be used to populate to two different select input.