API Documentation for: 1.1.1
Show:

ObjectUtils Class

Namespace: Canteen\Utilities

Utilities methods for handling objects

Item Index

Methods

Methods

getUniqueValues

(
  • objects
  • field
  • [recursive=false]
  • [&values=null]
)
Array static

Get the collection of unique ids on a collection of properties

Parameters:

  • objects Array | Object

    The collection of objects

  • field String

    The name of the field to get unique vlues on

  • [recursive=false] Boolean optional

    If we should look at object keys for addional array or objects which might contain fields.

  • [&values=null] Array optional

    The capture of values

Returns:

Array:

The unique values on an object field