This is what the object looks like:
0: {Key: "1", Value: "cat1"}
1: {Key: "2", Value: "cat2"}
2: {Key: "3", Value: "cat3"}
3: {Key: "4", Value: "cat4"}
4: {Key: "5", Value: "cat5"}
HTML:
<select id="edit-category-dropdown" class="selectpicker" multiple data-selected-text-format="count > 3" data-style="custom-select">
I need to add dropdown options to this select element with value attrib = object.key and the innertext to = object.Value.
I want it in this format ideally.
<option value=object.Key>object.Value</option>
I have tried append to the element but it doesn't seem to work.
Update: apprently the issue was not my code that appended a new dropddown list but it was the fact that i didnt do a .selectpicker("refresh") on my select element. It fixed the issue with display.