Latest
function default
import { default } from "https://dotland.deno.dev/x/lodash_es@v0.0.2/src/property.js";

Creates a function that returns the value at path of a given object.

Examples

var objects = [ { 'a': { 'b': 2 } }, { 'a': { 'b': 1 } } ];

_.map(objects, _.property('a.b')); // => [2, 1]

.map(.sortBy(objects, _.property(['a', 'b'])), 'a.b'); // => [1, 2]

Parameters

path

The path of the property to get.