Can you dynamically add multiple JSON files to a drop-down menu in JavaScript without just pulling out individual values? Let's say we have two JSON files structured like this:
var data = [
{date: "A", quantity: 2, total: 190, tip: 100, type: "tab"},
...
];
var data1 = [
{date: "m", quantity: 2, total: 190, tip: 100, type: "tab"},
...
];
Now, imagine we create two drop-down menus:
<select onchange = "???" id="data" class="wrapper-dropdown">
<option value="data">data</option>
<option value="data1">data1</option>
</select>
<select onchange="???" id="total" class="wrapper-dropdown">
<option value ="190">190</option>
...
<option value ="300">300</option>
</select>
What should be placed instead of "???" to ensure that clicking either drop-down menu will display the filtered value from the selected JSON file on the console?