Gets specified properties from different objects.
The map argument maps property keys to iterables of objects (or functions that return such iterables).
map
import { get } from 'deleight/object/shared'let obj1 = { a: 1, b: 2, c: 3 }, obj2 = { a: 1, b: 2, c: 3 };const objects = { a: [obj1], b: [obj2], c: [obj1] };const vals = get(objects); // { a: [1], b: [2], c: [3] } Copy
import { get } from 'deleight/object/shared'let obj1 = { a: 1, b: 2, c: 3 }, obj2 = { a: 1, b: 2, c: 3 };const objects = { a: [obj1], b: [obj2], c: [obj1] };const vals = get(objects); // { a: [1], b: [2], c: [3] }
Gets specified properties from different objects.
The
map
argument maps property keys to iterables of objects (or functions that return such iterables).