Function

obj
Object
list
String...|Array
of keys to get
returns
Object

To get multiple properties at once, call getProperties with an object followed by a list of strings or an array:

1
2
3
4
import { getProperties } from '@ember/object';

getProperties(record, 'firstName', 'lastName', 'zipCode');
// { firstName: 'John', lastName: 'Doe', zipCode: '10011' }

is equivalent to:

1
2
3
4
import { getProperties } from '@ember/object';

getProperties(record, ['firstName', 'lastName', 'zipCode']);
// { firstName: 'John', lastName: 'Doe', zipCode: '10011' }