Namespace: getters

pinia-jsonapi.createJsonapiStore.getters

Pinia getters, used via this.$store.getters, e.g.: this.$store.getters['jv/get'](<args>)

Source:

Methods

(static) getData(data, jsonpath) → {object}

Get record(s) from the store

Parameters:
Name Type Description
data string | object
string

A URL path to an item - e.g. endpoint/1

object

A restructured object - e.g. { _jv: { type: "endpoint", id: "1" } }

jsonpath string

a JSONPath string to filter the record(s) which are being retrieved. See JSONPath Syntax

Source:
Returns:

Restructured representation of the record(s)

Type
object

(static) getRelatedData(data) → {object}

Get the related record(s) of a record from the store

Parameters:
Name Type Description
data string | object
string

A URL path to an item - e.g. endpoint/1

object

A restructured object - e.g. { _jv: { type: "endpoint", id: "1" } }

Source:
Returns:

Restructured representation of the record(s)

Type
object