var array = [
{columnsexpo: "First Name", placeholder: true}
{columnsexpo: "Middle Name / Initial", placeholder: true}
{columnsexpo: "Last Name", placeholder: true}
{columnsexpo: "Email", placeholder: true}
{columnsexpo: "Work Experience / Begin date", placeholder: true}
]
self.firmData.forEach(function (data) {
$(this.itemlists).append("<div class='item'>" + data.DisplayName + "</div>");
$("#lstBox1").append($('<option>').text(data.DisplayName).attr('value', data.DisplayName));
self.dt.push(data.DisplayName);
});
This is my Html code:
<div class="menu">
<select multiple="multiple" id='lstBox2' >
</select>
</div>
i have a array of objects like this in a table as shown in fig.
Now i want to remove selected field for example: if i select Email that field should be deleted from the array and new array should display . I tried this using pop()
method this is removing last field but not selected field .
EDIT
I don't need to hardcode deleting value i need to remove selected value