java.lang.Object
io.github.jeemv.springboot.vuejs.utilities.JsArray

public class JsArray extends Object
JsArray Javascript array utilities This class is part of springBoot-VueJS
  • Constructor Details

    • JsArray

      public JsArray()
  • Method Details

    • remove

      public static String remove(String array, String element)
      Remove an element from array
      Parameters:
      array - the array reference
      element - the element to remove
      Returns:
    • replace

      public static String replace(String array, String index, String element)
      Replace an element at index position in array
      Parameters:
      array - the array reference
      index - The index of the element to replace
      element - The element to replace with
      Returns:
    • add

      public static String add(String array, String element)
      Adds an element to array
      Parameters:
      array - The array reference
      element - The element to add
      Returns:
    • addOrReplace

      public static String addOrReplace(String array, String index, String element)
      Adds or replace an element in array
      Parameters:
      array - The array reference
      index - The index of the element to replace or -1 for adding
      element - The element to add or replace
      Returns:
    • addAll

      public static String addAll(String array, String elements)
      Adds all elements from an array to another
      Parameters:
      array - The array reference
      elements - The elements to add
      Returns:
    • removeByProperty

      public static String removeByProperty(String array, String property, String value)
      Remove an element from array by property
      Parameters:
      array - The array reference
      property - The property to compare
      value - The value to compare
      Returns:
    • findByProperty

      public static String findByProperty(String array, String property, String value)
    • findIndexByProperty

      public static String findIndexByProperty(String array, String property, String value)
    • containsByProperty

      public static String containsByProperty(String array, String property, String value)
    • contains

      public static String contains(String array, String element)
    • letFindByProperty

      public static String letFindByProperty(String variable, String array, String property, String value)
    • letRemoveByProperty

      public static String letRemoveByProperty(String variable, String array, String property, String value)