usePluck()
Usage
import { useRepo } from 'pinia-orm'
import { usePluck } from 'pinia-orm/helpers'
import User from './models/User'
const users = useRepo(User).all()
// retrieve all values of the 'age' attribute
usePluck(users, 'age')
// retrieve all values of the 'role.title' attribute. The dot notation works only for 1n1 Relations
usePluck(users, 'role.title')
Type Declaration
export function usePluck(models: Collection, field: string): any[]
Table of Contents