/ LJCJSCodeDoc / LJCCollectionLib / LJCCollection / Remove


Parameters
dataColumns - The unique data names and values.

Syntax

JavaScript
Remove(dataColumns)

Removes the the object which matches the data values.

Example

JavaScript
// Removes the object which matches the data values.
Remove()
{
  const testItems = new TestItems();
  let testItem = testItems.Add("NameOne");
  testItem.Sequence = 1;
  testItem = testItems.Add("NameTwo");
  testItem.Sequence = 2;

  const dataColumns = new LJCDataColumns();
  dataColumns.AddValue("Name", "NameOne");
  testItems.Remove(dataColumns);

  testItem = testItems.RetrieveAtIndex(0);
  const result = testItem.Name;
  
  // result:
  // NameTwo
}

Copyright © Lester J. Clark and Contributors.
Licensed under the MIT License.