Skip to content

Get

Information
Type Data Function
Namespace moxlib:api/data/get
Versions 1.15+

Overview

Retrieves the first Object in target to successfully Compare with key.

Example

In this example, key is set to {id:2}. As such, it returns {id:2,b:1} to output.

data modify storage moxlib:api/data/get target set value [{id:1,a:1},{id:2,b:1},{id:3,c:1}]
data modify storage moxlib:api/data/get key set value {id:2}
function moxlib:api/data/get
Output of storage moxlib:api/data/get
{
  output: {id:2,b:1},
  success: true
}

API

Expects:

Returns

The first Object to Compare with key, if any.


If an object could be found, true. Otherwise, false.